Compare commits
No commits in common. "7966a0253026db6d185d1ceabe75ed2bf10efd40" and "2eee4dfedfc96dadf02cd21ed6843f7140cc991c" have entirely different histories.
7966a02530
...
2eee4dfedf
|
@ -327,10 +327,7 @@ vars:
|
||||||
{
|
{
|
||||||
"aliases":[],
|
"aliases":[],
|
||||||
"ssl_cert":"certbot",
|
"ssl_cert":"certbot",
|
||||||
"doc_root":"$(apache.www_dir)/$(site_param[domain])",
|
"doc_root":"$(apache.www_dir)/$(site_param[domain])"
|
||||||
"doc_root_options":"Indexes FollowSymLinks",
|
|
||||||
"php":true,
|
|
||||||
"php_handler":"application/x-httpd-php"
|
|
||||||
}
|
}
|
||||||
';
|
';
|
||||||
|
|
||||||
|
|
16
dovecot.cf
16
dovecot.cf
|
@ -34,22 +34,6 @@ vars:
|
||||||
"dovecot-pop3d"
|
"dovecot-pop3d"
|
||||||
|
|
||||||
};
|
};
|
||||||
centos::
|
|
||||||
"pkgs" slist => {
|
|
||||||
"dovecot",
|
|
||||||
"dovecot-mysql",
|
|
||||||
};
|
|
||||||
"cfg_dir" string => "/etc/dovecot";
|
|
||||||
"dovecot_conf" string => "$(cfg_dir)/dovecot.conf";
|
|
||||||
|
|
||||||
"imap_key" string => "$(cfg_dir)/private/imap.key";
|
|
||||||
"imap_cert" string => "$(cfg_dir)/private/imap.crt";
|
|
||||||
"submission_key" string => "$(cfg_dir)/private/submission.key";
|
|
||||||
"submission_cert" string => "$(cfg_dir)/private/submission.crt";
|
|
||||||
"service_name" string => "dovecot";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => wmde_install_packages(@(pkgs),"dovecot");
|
"any" usebundle => wmde_install_packages(@(pkgs),"dovecot");
|
||||||
|
|
11
lib.cf
11
lib.cf
|
@ -243,24 +243,15 @@ methods:
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle agent install_system_repos
|
bundle agent install_system_repos
|
||||||
|
|
||||||
{
|
{
|
||||||
classes:
|
|
||||||
centos::
|
|
||||||
"centos_9_and_later" expression => isgreaterthan("$(sys.os_version_major)", "8") ;
|
|
||||||
vars:
|
vars:
|
||||||
"pkgs" slist => {};
|
"pkgs" slist => {};
|
||||||
centos::
|
centos::
|
||||||
"pkgs" slist => {
|
"pkgs" slist => {
|
||||||
"epel-release"
|
"epel-release"
|
||||||
};
|
};
|
||||||
commands:
|
|
||||||
centos_9_and_later::
|
|
||||||
"/usr/bin/dnf"
|
|
||||||
inform => "false",
|
|
||||||
args => "config-manager --set-enabled crb";
|
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => wmde_install_packages(@(pkgs),"system_repos");
|
"any" usebundle => wmde_install_packages(@(pkgs),"system_repos");
|
||||||
|
|
||||||
reports:
|
|
||||||
}
|
}
|
||||||
|
|
8
mysql.cf
8
mysql.cf
|
@ -110,11 +110,7 @@ vars:
|
||||||
"$(mysql.default_datadir)");
|
"$(mysql.default_datadir)");
|
||||||
|
|
||||||
type_mariadb::
|
type_mariadb::
|
||||||
"install_db_exe" string => ifelse(fileexists("$(mysql.bin_dir)/mysql_install_db"),
|
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(mysql.bin_dir)/mariadb-install-db --user=$(mysql.user)>/dev/null ; fi";
|
||||||
"$(mysql.bin_dir)/mysql_install_db",
|
|
||||||
"$(mysql.bin_dir)/mariadb-install-db");
|
|
||||||
|
|
||||||
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(install_db_exe) --user=$(mysql.user)>/dev/null ; fi";
|
|
||||||
type_mysql8::
|
type_mysql8::
|
||||||
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(mysql.mysqld_cmd) --initialize-insecure --user=$(mysql.user); fi";
|
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(mysql.mysqld_cmd) --initialize-insecure --user=$(mysql.user); fi";
|
||||||
|
|
||||||
|
@ -275,7 +271,7 @@ bundle agent create_mysql_backup_cron_job(cfg,file,table_name,run)
|
||||||
classes:
|
classes:
|
||||||
"create_cron" expression => strcmp("$(run)","true");
|
"create_cron" expression => strcmp("$(run)","true");
|
||||||
vars:
|
vars:
|
||||||
"table_exists_cmd" string => '$(mysql.mysql_cmd) -h$(cfg[db_host]) -u$(cfg[db_user]) -p$(cfg[db_pass]) $(cfg[db_name]) -e "show tables LIKE \'$(table_name)\'" | grep -q $(table_name)';
|
"table_exists_cmd" string => '$(mysql.mysql_cmd) -u$(cfg[db_user]) -p$(cfg[db_pass]) $(cfg[db_name]) -e "show tables LIKE \'$(table_name)\'" | grep -q $(table_name)';
|
||||||
"backup_cmd" string => "$(mysql.mysqldump_cmd) --complete-insert --routines --triggers --single-transaction --max_allowed_packet=512M -h$(cfg[db_host]) -u$(cfg[db_user]) -p$(cfg[db_pass]) $(cfg[db_name]) >$(file)";
|
"backup_cmd" string => "$(mysql.mysqldump_cmd) --complete-insert --routines --triggers --single-transaction --max_allowed_packet=512M -h$(cfg[db_host]) -u$(cfg[db_user]) -p$(cfg[db_pass]) $(cfg[db_name]) >$(file)";
|
||||||
|
|
||||||
|
|
||||||
|
|
55
opendkim.cf
55
opendkim.cf
|
@ -5,8 +5,6 @@
|
||||||
bundle agent opendkim(cfg_param)
|
bundle agent opendkim(cfg_param)
|
||||||
{
|
{
|
||||||
vars:
|
vars:
|
||||||
"service_name" string => "opendkim";
|
|
||||||
|
|
||||||
debian::
|
debian::
|
||||||
"pkgs" slist => {"opendkim"};
|
"pkgs" slist => {"opendkim"};
|
||||||
"uid" string => "opendkim";
|
"uid" string => "opendkim";
|
||||||
|
@ -14,15 +12,6 @@ vars:
|
||||||
"cfg_file" string => "/etc/opendkim.conf";
|
"cfg_file" string => "/etc/opendkim.conf";
|
||||||
#"pid_file" string => "/var/run/opendkim.pid";
|
#"pid_file" string => "/var/run/opendkim.pid";
|
||||||
"pid_file" string => "/run/opendkim/opendkim.pid";
|
"pid_file" string => "/run/opendkim/opendkim.pid";
|
||||||
|
|
||||||
centos::
|
|
||||||
"pkgs" slist => {"opendkim"};
|
|
||||||
"uid" string => "opendkim";
|
|
||||||
"gid" string => "opendkim";
|
|
||||||
"cfg_file" string => "/etc/opendkim.conf";
|
|
||||||
#"pid_file" string => "/var/run/opendkim.pid";
|
|
||||||
"pid_file" string => "/run/opendkim/opendkim.pid";
|
|
||||||
|
|
||||||
freebsd::
|
freebsd::
|
||||||
"pkgs" slist => {"opendkim"};
|
"pkgs" slist => {"opendkim"};
|
||||||
"uid" string => "mailnull";
|
"uid" string => "mailnull";
|
||||||
|
@ -50,51 +39,23 @@ vars:
|
||||||
|
|
||||||
|
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => opendkim_systemd_overrides,
|
"any" usebundle => wmde_install_packages(@(opendkim.pkgs),"opendkim"),
|
||||||
handle => "opendkim_overrides_done";
|
handle => "opendkim_installed";
|
||||||
"any" usebundle => wmde_install_packages(@(opendkim.pkgs),"opendkim");
|
|
||||||
|
|
||||||
"any" usebundle => wmde_service("$(service_name)","opendkim_kept","opendkim_repaired"),
|
|
||||||
depends_on => {
|
|
||||||
"opendkim_overrides_done",
|
|
||||||
"opendkim_pkgs_installed",
|
|
||||||
"opendkim_cfg_done"
|
|
||||||
};
|
|
||||||
|
|
||||||
files:
|
files:
|
||||||
"$(opendkim.cfg_file)"
|
"$(opendkim.cfg_file)"
|
||||||
create => "true",
|
create => "true",
|
||||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/opendkim.conf.mustache",
|
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/opendkim.conf.mustache",
|
||||||
template_method => "mustache",
|
template_method => "mustache",
|
||||||
template_data => bundlestate("opendkim"),
|
template_data => bundlestate("opendkim");
|
||||||
classes => if_repaired("opendkim_repaired"),
|
# template_data => mergedata(@(opendkim.default_cfg),@(opendkim.cfg));
|
||||||
handle => "opendkim_cfg_done";
|
|
||||||
|
|
||||||
|
|
||||||
reports:
|
reports:
|
||||||
|
# "HALLO DIKM";
|
||||||
|
# "MYLEN: $(mynetworks_len)";
|
||||||
|
# "HEAD: $(mynetworks_head)";
|
||||||
|
# "TAIL: $(mynetworks_tail)";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bundle agent opendkim_systemd_overrides
|
|
||||||
{
|
|
||||||
files:
|
|
||||||
centos::
|
|
||||||
|
|
||||||
"/etc/systemd/system/opendkim.service.d/override.conf"
|
|
||||||
create => "true",
|
|
||||||
content => "
|
|
||||||
[Service]
|
|
||||||
User=root
|
|
||||||
Group=root
|
|
||||||
",
|
|
||||||
classes => if_repaired("opendkim_repaired"),
|
|
||||||
handle => "opendkim_systemd_override_created";
|
|
||||||
|
|
||||||
commands:
|
|
||||||
centos&opendkim_repaired::
|
|
||||||
"/usr/bin/systemctl"
|
|
||||||
args => "daemon-reload",
|
|
||||||
depends_on => {"opendkim_systemd_override_created"};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
3
php.cf
3
php.cf
|
@ -15,6 +15,7 @@ vars:
|
||||||
freebsd::
|
freebsd::
|
||||||
|
|
||||||
freebsd::
|
freebsd::
|
||||||
|
"cli_exe" string => "/usr/local/bin/php";
|
||||||
"pkgs" slist => {
|
"pkgs" slist => {
|
||||||
"php$(php.bsdvs)-session",
|
"php$(php.bsdvs)-session",
|
||||||
"php$(php.bsdvs)-zip",
|
"php$(php.bsdvs)-zip",
|
||||||
|
@ -104,7 +105,6 @@ methods:
|
||||||
bundle agent php(settings)
|
bundle agent php(settings)
|
||||||
{
|
{
|
||||||
vars:
|
vars:
|
||||||
"ini_files" slist => { };
|
|
||||||
|
|
||||||
debian::
|
debian::
|
||||||
"version" string => "8.0";
|
"version" string => "8.0";
|
||||||
|
@ -147,7 +147,6 @@ vars:
|
||||||
"apache_f" string => "libphp";
|
"apache_f" string => "libphp";
|
||||||
|
|
||||||
centos::
|
centos::
|
||||||
"cli_exe" string => "/usr/bin/php";
|
|
||||||
"version" string => "";
|
"version" string => "";
|
||||||
"fpm_pkgs" slist => { "php$(version)-fpm" };
|
"fpm_pkgs" slist => { "php$(version)-fpm" };
|
||||||
"fpm_service_name" string => "php$(version)-fpm";
|
"fpm_service_name" string => "php$(version)-fpm";
|
||||||
|
|
23
postfix.cf
23
postfix.cf
|
@ -45,29 +45,6 @@ vars:
|
||||||
"group" string => "postfix";
|
"group" string => "postfix";
|
||||||
"mail_owner" string => "postfix";
|
"mail_owner" string => "postfix";
|
||||||
"postmap_cmd" string => "/usr/sbin/postmap";
|
"postmap_cmd" string => "/usr/sbin/postmap";
|
||||||
|
|
||||||
centos::
|
|
||||||
"pkgs" slist => {
|
|
||||||
"postfix",
|
|
||||||
"postfix-mysql"
|
|
||||||
};
|
|
||||||
"service_name" string => "postfix";
|
|
||||||
"cfg_dir" string => "/etc/postfix";
|
|
||||||
"master_cf" string => "/etc/postfix/master.cf";
|
|
||||||
"main_cf" string => "/etc/postfix/main.cf";
|
|
||||||
"mailer_conf" string => "/usr/local/etc/mail/mailer.conf";
|
|
||||||
"mail_group" string => "postdrop";
|
|
||||||
"daemon_dir" string => "/usr/libexec/postfix/";
|
|
||||||
"bin_dir" string => "/usr/bin";
|
|
||||||
"sbin_dir" string => "/usr/sbin";
|
|
||||||
"queue_dir" string => "/var/spool/postfix";
|
|
||||||
"db_dir" string => "/var/db";
|
|
||||||
"user" string => "postfix";
|
|
||||||
"group" string => "postfix";
|
|
||||||
"mail_owner" string => "postfix";
|
|
||||||
"postmap_cmd" string => "/usr/sbin/postmap";
|
|
||||||
|
|
||||||
|
|
||||||
any::
|
any::
|
||||||
"data_dir" string => "$(db_dir)/postfix";
|
"data_dir" string => "$(db_dir)/postfix";
|
||||||
"maps_dir" string => "$(cfg_dir)/maps";
|
"maps_dir" string => "$(cfg_dir)/maps";
|
||||||
|
|
19
sympa.cf
19
sympa.cf
|
@ -8,7 +8,7 @@ classes:
|
||||||
"sympa_b";
|
"sympa_b";
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
debian::
|
debian&sympa_b::
|
||||||
"lib_dir" string => "/usr/lib/sympa";
|
"lib_dir" string => "/usr/lib/sympa";
|
||||||
"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";
|
||||||
|
@ -23,23 +23,6 @@ vars:
|
||||||
"sympa"
|
"sympa"
|
||||||
};
|
};
|
||||||
|
|
||||||
centos::
|
|
||||||
"lib_dir" string => "/usr/lib/sympa";
|
|
||||||
"var_lib_dir" string => "/var/lib/sympa";
|
|
||||||
"share_dir" string => "/usr/share/sympa";
|
|
||||||
"conf_dir" string => "/etc/sympa";
|
|
||||||
"sympa_conf" string => "$(conf_dir)/sympa/sympa.conf";
|
|
||||||
"service_name" string => "sympa";
|
|
||||||
"wwservice_name" string => "wwsympa";
|
|
||||||
"wwsympa_socket" string => "/var/run/sympa/wwsympa.socket";
|
|
||||||
"sympa_pl_cmd" string => "/usr/bin/sympa";
|
|
||||||
|
|
||||||
"pkgs" slist => {
|
|
||||||
"sympa"
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
debian&sympa_s::
|
debian&sympa_s::
|
||||||
"install_dir" string => "/usr/local/sympa";
|
"install_dir" string => "/usr/local/sympa";
|
||||||
|
|
|
@ -3,16 +3,12 @@
|
||||||
#
|
#
|
||||||
<Directory {{vars.apache_vhost.site.doc_root}}>
|
<Directory {{vars.apache_vhost.site.doc_root}}>
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
Options {{ vars.apache_vhost.site.doc_root_options }}
|
Options Indexes FollowSymLinks
|
||||||
Require all granted
|
Require all granted
|
||||||
{{#vars.apache_vhost.site.php}}
|
|
||||||
<FilesMatch ".+(\.php)$">
|
<FilesMatch ".+(\.php)$">
|
||||||
SetHandler {{vars.apache_vhost.site.php_handler}}
|
SetHandler application/x-httpd-php
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
{{/vars.apache_vhost.site.php}}
|
|
||||||
|
|
||||||
DirectoryIndex index.php index.html
|
DirectoryIndex index.php index.html
|
||||||
{{{vars.apache_vhost.site.dir_raw}}}
|
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
{{^vars.apache_vhost.site.ssl}}
|
{{^vars.apache_vhost.site.ssl}}
|
||||||
|
|
|
@ -57,7 +57,7 @@ files:
|
||||||
|
|
||||||
|
|
||||||
"$(cfg[install_dir])/public/.htaccess"
|
"$(cfg[install_dir])/public/.htaccess"
|
||||||
copy_from => seed_cp("$(cfg[install_dir])/public/.htaccess.dist"),
|
copy_from => local_cp("$(cfg[install_dir])/public/.htaccess.dist"),
|
||||||
perms => mog("644","root","root"),
|
perms => mog("644","root","root"),
|
||||||
depends_on => {"vimbadmin_untarred"},
|
depends_on => {"vimbadmin_untarred"},
|
||||||
handle => "vimbadmin_htaccess_copied";
|
handle => "vimbadmin_htaccess_copied";
|
||||||
|
@ -130,9 +130,6 @@ methods:
|
||||||
"any" usebundle => php_composer;
|
"any" usebundle => php_composer;
|
||||||
"any" usebundle => mysql_table_exists(@(cfg),"admin");
|
"any" usebundle => mysql_table_exists(@(cfg),"admin");
|
||||||
|
|
||||||
vimbadmin_restore_db_file::
|
|
||||||
"any" usebundle => create_mysql_backup_cron_job(@(cfg),"$(cfg[restore_db_file])","admin","true");
|
|
||||||
|
|
||||||
reports:
|
reports:
|
||||||
# "VIMBADMIN $(cfg[restore_db_file])";
|
# "VIMBADMIN $(cfg[restore_db_file])";
|
||||||
|
|
||||||
|
@ -150,6 +147,6 @@ reports:
|
||||||
body contain vimbadmin_cmd
|
body contain vimbadmin_cmd
|
||||||
{
|
{
|
||||||
|
|
||||||
exec_owner => "$(apache.www_user)";
|
exec_owner => "www-data";
|
||||||
exec_group => "$(apache.www_group)";
|
exec_group => "www-data";
|
||||||
}
|
}
|
||||||
|
|
7
wget.cf
7
wget.cf
|
@ -2,11 +2,14 @@
|
||||||
bundle agent wget
|
bundle agent wget
|
||||||
{
|
{
|
||||||
vars:
|
vars:
|
||||||
"pkgs" slist => {"wget","tar"};
|
"pkgs" slist => {"wget"};
|
||||||
|
|
||||||
"exe" string => "/usr/bin/wget";
|
|
||||||
freebsd::
|
freebsd::
|
||||||
"exe" string => "/usr/local/bin/wget";
|
"exe" string => "/usr/local/bin/wget";
|
||||||
|
debian::
|
||||||
|
"exe" string => "/usr/bin/wget";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bundle agent install_wget
|
bundle agent install_wget
|
||||||
|
|
Loading…
Reference in New Issue