Compare commits
12 Commits
2eee4dfedf
...
7966a02530
Author | SHA1 | Date |
---|---|---|
Tobias Herre | 7966a02530 | |
Tobias Herre | c72ad8ef06 | |
Tobias Herre | 1733552f7e | |
Tobias Herre | 578ba9e6de | |
Tobias Herre | bc3302193e | |
Tobias Herre | c5ca217100 | |
Tobias Herre | 21acb0f5d6 | |
Tobias Herre | 54cb28122a | |
Tobias Herre | d0b03d033b | |
Tobias Herre | 2e7d7c8002 | |
Tobias Herre | d259712920 | |
Tobias Herre | b826e8f6f8 |
|
@ -327,7 +327,10 @@ 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,6 +34,22 @@ 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,15 +243,24 @@ 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,7 +110,11 @@ vars:
|
||||||
"$(mysql.default_datadir)");
|
"$(mysql.default_datadir)");
|
||||||
|
|
||||||
type_mariadb::
|
type_mariadb::
|
||||||
"install_db_cmd" string => "if [ ! -d $(datadir)/mysql ]; then $(mysql.bin_dir)/mariadb-install-db --user=$(mysql.user)>/dev/null ; fi";
|
"install_db_exe" string => ifelse(fileexists("$(mysql.bin_dir)/mysql_install_db"),
|
||||||
|
"$(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";
|
||||||
|
|
||||||
|
@ -271,7 +275,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) -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) -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)';
|
||||||
"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,6 +5,8 @@
|
||||||
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";
|
||||||
|
@ -12,6 +14,15 @@ 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";
|
||||||
|
@ -39,23 +50,51 @@ vars:
|
||||||
|
|
||||||
|
|
||||||
methods:
|
methods:
|
||||||
"any" usebundle => wmde_install_packages(@(opendkim.pkgs),"opendkim"),
|
"any" usebundle => opendkim_systemd_overrides,
|
||||||
handle => "opendkim_installed";
|
handle => "opendkim_overrides_done";
|
||||||
|
"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"),
|
||||||
# template_data => mergedata(@(opendkim.default_cfg),@(opendkim.cfg));
|
classes => if_repaired("opendkim_repaired"),
|
||||||
|
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,7 +15,6 @@ 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",
|
||||||
|
@ -105,6 +104,7 @@ 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,6 +147,7 @@ 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,6 +45,29 @@ 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&sympa_b::
|
debian::
|
||||||
"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,6 +23,23 @@ 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,12 +3,16 @@
|
||||||
#
|
#
|
||||||
<Directory {{vars.apache_vhost.site.doc_root}}>
|
<Directory {{vars.apache_vhost.site.doc_root}}>
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
Options Indexes FollowSymLinks
|
Options {{ vars.apache_vhost.site.doc_root_options }}
|
||||||
Require all granted
|
Require all granted
|
||||||
|
{{#vars.apache_vhost.site.php}}
|
||||||
<FilesMatch ".+(\.php)$">
|
<FilesMatch ".+(\.php)$">
|
||||||
SetHandler application/x-httpd-php
|
SetHandler {{vars.apache_vhost.site.php_handler}}
|
||||||
</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 => local_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"),
|
||||||
depends_on => {"vimbadmin_untarred"},
|
depends_on => {"vimbadmin_untarred"},
|
||||||
handle => "vimbadmin_htaccess_copied";
|
handle => "vimbadmin_htaccess_copied";
|
||||||
|
@ -130,6 +130,9 @@ 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])";
|
||||||
|
|
||||||
|
@ -147,6 +150,6 @@ reports:
|
||||||
body contain vimbadmin_cmd
|
body contain vimbadmin_cmd
|
||||||
{
|
{
|
||||||
|
|
||||||
exec_owner => "www-data";
|
exec_owner => "$(apache.www_user)";
|
||||||
exec_group => "www-data";
|
exec_group => "$(apache.www_group)";
|
||||||
}
|
}
|
||||||
|
|
7
wget.cf
7
wget.cf
|
@ -2,14 +2,11 @@
|
||||||
bundle agent wget
|
bundle agent wget
|
||||||
{
|
{
|
||||||
vars:
|
vars:
|
||||||
"pkgs" slist => {"wget"};
|
"pkgs" slist => {"wget","tar"};
|
||||||
|
|
||||||
|
"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