Compare commits

...

4 Commits

Author SHA1 Message Date
Tobias Herre 7a6a4ae133 Don't use dovecotadm to set passwords 2023-10-29 20:15:04 +01:00
Tobias Herre bcfa88cdd4 djustments for CentOS 2023-10-29 20:14:15 +01:00
Tobias Herre cdeabb3a19 Fixes for CentOS 2023-10-29 20:13:44 +01:00
Tobias Herre 9c0bb69173 Special repos for CentOS 7 2023-10-29 20:13:04 +01:00
4 changed files with 34 additions and 6 deletions

5
lib.cf
View File

@ -196,6 +196,7 @@ reports:
bundle agent install_apt_repo(name,repo_src,key_src,key_name) bundle agent install_apt_repo(name,repo_src,key_src,key_name)
{ {
classes: classes:
@ -273,6 +274,10 @@ commands:
handle=>"system_repos_pkgs_installed"; handle=>"system_repos_pkgs_installed";
centos_8::
"/usr/bin/dnf"
inform => "false",
args => "config-manager --set-enabled powertools";
centos_9_and_later:: centos_9_and_later::
"/usr/bin/dnf" "/usr/bin/dnf"

View File

@ -4,6 +4,7 @@
bundle agent rspamd(cfg) bundle agent rspamd(cfg)
{ {
classes:
vars: vars:
"cfgfiles" slist => { "cfgfiles" slist => {
"local.d/milter_headers.conf", "local.d/milter_headers.conf",
@ -30,9 +31,18 @@ vars:
"root_user" string => "root"; "root_user" string => "root";
"root_group" string => "root"; "root_group" string => "root";
centos::
"pkgs" slist => {"rspamd"};
"cfg_dir" string => "/etc/rspamd";
"service_name" string => "rspamd";
"root_user" string => "root";
"root_group" string => "root";
methods: methods:
"any" usebundle => wmde_install_packages(@(pkgs),"rspamd"); "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 => wmde_service("$(service_name)","rspamd_kept","rspamd_repaired"), "any" usebundle => wmde_service("$(service_name)","rspamd_kept","rspamd_repaired"),
depends_on => {"rspamd_cfgs_done"}; depends_on => {"rspamd_cfgs_done"};
files: files:
@ -58,4 +68,16 @@ reports:
} }
bundle agent rspamd_install_yum_repo
{
classes:
centos::
"install_yum_repo" expression => not(fileexists("/etc/yum.repos.d/rspamd.repo"));
commands:
install_yum_repo::
"wget"
args => "-qO /etc/yum.repos.d/rspamd.repo https://rspamd.com/rpm-stable/centos-8/rspamd.repo && rpm --import https://rspamd.com/rpm-stable/gpg.key && yum update -y",
contain => wmde_cmd_useshell;
}

View File

@ -28,11 +28,11 @@ vars:
"var_lib_dir" string => "/var/lib/sympa"; "var_lib_dir" string => "/var/lib/sympa";
"share_dir" string => "/usr/share/sympa"; "share_dir" string => "/usr/share/sympa";
"conf_dir" string => "/etc/sympa"; "conf_dir" string => "/etc/sympa";
"sympa_conf" string => "$(conf_dir)/sympa/sympa.conf"; "sympa_conf" string => "$(conf_dir)/sympa.conf";
"service_name" string => "sympa"; "service_name" string => "sympa";
"wwservice_name" string => "wwsympa"; "wwservice_name" string => "wwsympa";
"wwsympa_socket" string => "/var/run/sympa/wwsympa.socket"; "wwsympa_socket" string => "/var/run/sympa/wwsympa.socket";
"sympa_pl_cmd" string => "/usr/bin/sympa"; "sympa_pl_cmd" string => "/usr/sbin/sympa.pl";
"pkgs" slist => { "pkgs" slist => {
"sympa" "sympa"
@ -243,7 +243,9 @@ vars:
"db_name":"$(cfg[db_settings][db_name])", "db_name":"$(cfg[db_settings][db_name])",
"db_host":"$(cfg[db_settings][db_host])", "db_host":"$(cfg[db_settings][db_host])",
"db_passwd":"$(cfg[db_settings][db_pass])", "db_passwd":"$(cfg[db_settings][db_pass])",
"db_user":"$(cfg[db_settings][db_user])" "db_user":"$(cfg[db_settings][db_user])",
"css_url":"/css-sympa",
"static_content_url":"/static-sympa"
}'; }';

View File

@ -29,6 +29,7 @@ vars:
"vsettings[server.email.address]" string => "$(cfg[server_email_address])"; "vsettings[server.email.address]" string => "$(cfg[server_email_address])";
"vsettings[resources.mail.transport.type]" string => "'smtp'"; "vsettings[resources.mail.transport.type]" string => "'smtp'";
"vsettings[resources.mail.transport.host]" string => "'127.0.0.1'"; "vsettings[resources.mail.transport.host]" string => "'127.0.0.1'";
"vsettings[defaults.mailbox.password_scheme]" string => "crypt:sha256";
# #
classes: classes:
"vimbadmin_checked_out" expression => fileexists("$(cfg[dst_dir])/.git"); "vimbadmin_checked_out" expression => fileexists("$(cfg[dst_dir])/.git");
@ -59,8 +60,6 @@ files:
perms => m(644), perms => m(644),
classes => if_repaired(vimbadmin_reconfigure); classes => if_repaired(vimbadmin_reconfigure);
"$(cfg[install_dir])/public/.htaccess" "$(cfg[install_dir])/public/.htaccess"
copy_from => seed_cp("$(cfg[install_dir])/public/.htaccess.dist"), copy_from => seed_cp("$(cfg[install_dir])/public/.htaccess.dist"),
perms => mog("644","root","root"), perms => mog("644","root","root"),