bundle to install pkgs and stuff to use rspamadm
This commit is contained in:
parent
204c84a896
commit
6ecad2c411
29
rspamd.cf
29
rspamd.cf
|
@ -5,13 +5,16 @@
|
|||
bundle agent rspamd(cfg)
|
||||
{
|
||||
classes:
|
||||
"runpw" expression => isvariable("cfg[password]");
|
||||
|
||||
vars:
|
||||
"cfgfiles" slist => {
|
||||
"local.d/milter_headers.conf",
|
||||
# "local.d/actions.conf",
|
||||
"local.d/worker-normal.inc",
|
||||
"local.d/worker-proxy.inc",
|
||||
# "local.d/worker-controller.inc",
|
||||
"local.d/worker-controller.inc",
|
||||
"local.d/redis.conf",
|
||||
# "local.d/classifier-bayes.conf",
|
||||
# "local.d/worker-fuzzy.inc",
|
||||
# "local.d/fuzzy_check.conf"
|
||||
|
@ -23,6 +26,7 @@ vars:
|
|||
"service_name" string => "rspamd";
|
||||
"root_user" string => "root";
|
||||
"root_group" string => "wheel";
|
||||
"rspamadm" string => "/usr/local/bin/rspamadm";
|
||||
|
||||
debian::
|
||||
"pkgs" slist => {"rspamd"};
|
||||
|
@ -30,6 +34,7 @@ vars:
|
|||
"service_name" string => "rspamd";
|
||||
"root_user" string => "root";
|
||||
"root_group" string => "root";
|
||||
"rspamadm" string => "/usr//bin/rspamadm";
|
||||
|
||||
centos::
|
||||
"pkgs" slist => {"rspamd"};
|
||||
|
@ -37,12 +42,17 @@ vars:
|
|||
"service_name" string => "rspamd";
|
||||
"root_user" string => "root";
|
||||
"root_group" string => "root";
|
||||
"rspamadm" string => "/usr//bin/rspamadm";
|
||||
|
||||
any::
|
||||
"password" string => execresult("$(rspamadm) pw -p $(cfg[password])","noshell");
|
||||
|
||||
|
||||
|
||||
|
||||
methods:
|
||||
"any" usebundle => rspamd_install_yum_repo, handle => "rspamd_yum_repo_installed";
|
||||
"any" usebundle => wmde_install_packages(@(pkgs),"rspamd"),
|
||||
depends_on => {"rspamd_yum_repo_installed"};
|
||||
"any" usebundle => install_rspamd_pkgs;
|
||||
|
||||
"any" usebundle => wmde_service("$(service_name)","rspamd_kept","rspamd_repaired"),
|
||||
depends_on => {"rspamd_cfgs_done"};
|
||||
files:
|
||||
|
@ -61,6 +71,8 @@ files:
|
|||
classes => if_repaired(rspamd_repaired),
|
||||
handle => "rspamd_cfgs_done";
|
||||
|
||||
|
||||
|
||||
reports:
|
||||
# "RSPAMD: $(cfgjs)";
|
||||
# "RSJ: $(worker_normalx)";
|
||||
|
@ -81,3 +93,12 @@ commands:
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
bundle agent install_rspamd_pkgs
|
||||
{
|
||||
methods:
|
||||
"any" usebundle => rspamd_install_yum_repo, handle => "rspamd_yum_repo_installed";
|
||||
"any" usebundle => wmde_install_packages(@(rspamd.pkgs),"rspamd"),
|
||||
depends_on => {"rspamd_yum_repo_installed"};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue