Compare commits

..

No commits in common. "30c312b361885b722347f761ec67b7c7051248b8" and "088242592ae6003b8001b46fe6fc4d82808ff740" have entirely different histories.

4 changed files with 3 additions and 71 deletions

View File

@ -36,7 +36,6 @@ vars:
{m: "version",f:"mod_version"},
{m: "unixd",f:"mod_unixd"},
{m: "php7",f:"libphp7"},
{m: "ssl",f:"mod_ssl"}
]';
@ -61,49 +60,18 @@ vars:
"server_root" string => "/usr";
"modules" data => '[
{m:"php",f:"libphp8.2"},
{m:"ssl",f:"mod_ssl"},
{m:"php",f:"libphp8.2"}
]';
centos::
"pkgs" slist => {
"httpd",
"mod_ssl",
"libapache2-mod-php",
"libapache2-mod-svn",
};
fedora::
"pkgs" slist => {
"httpd",
# "mod_ssl",
};
fedora|centos::
"log_dir" string =>"/var/log/httpd";
"service_name" string => "httpd";
"restart_cmd" string => "/usr/bin/systemctl restart $(service_name)";
"www_user" string => "apache";
"www_group" string => "apache";
"mime_types" string => "/etc/mime.types";
"www_dir" string => "/var/www",unless => isvariable( $(this.promiser) ) ;
"default_html_dir" string => "$(www_dir)/html";
"etc_dir" string => "/etc";
"cfg_dir" string => "$(etc_dir)/httpd";
"main_cfg" string => "$(cfg_dir)/conf/httpd.conf";
"libexec_dir" string => "$(cfg_dir)/modules";
"server_root" string => "/var";
"modules" data => '[
{m: "autoindex",f:"mod_autoindex"},
{m: "log_config",f:"mod_log_config"},
{m: "version",f:"mod_version"},
{m: "unixd",f:"mod_unixd"},
]';
# {m: "php",f:"libphp8"},
ubuntu_20::
"phpm" string => "php7";
ubuntu_22::
@ -137,7 +105,7 @@ packages:
policy => "present",
package_module => apt_get,
classes => if_repaired(apache_changed);
fedora|centos::
centos::
"$(apache.pkgs)"
policy => "present",
package_module => yum,
@ -267,12 +235,3 @@ methods:
reports:
}
bundle agent configure_apache(sites)
{
vars:
"idx" slist => getindices(@(sites));
methods:
"any" usebundle => apache_vhost($(sites[$idx]));
}

View File

@ -40,21 +40,6 @@ packages:
policy => "present",
package_module => apt_get,
handle => "certbot_installed";
files:
freebsd::
"/etc/cron.d/certbot"
create => "true",
copy_from => local_cp("$(sys.workdir)/inputs/$(def.mfdomain)/templates/certbot-cron.mustache");
# content => '#
# Managed by CFEngine
#
#SHELL=/bin/sh
#PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#0 */12 * * * root certbot -q renew --no-random-sleep-on-renew
#';
}
bundle agent certbot_cert(site,webroot)

View File

@ -1,8 +0,0 @@
#
# Managed by CFEngine
#
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 */12 * * * root certbot -q renew --no-random-sleep-on-renew

View File

@ -56,11 +56,7 @@ Listen 443
# Go ahead and accept connections for these vhosts
# from non-SNI clients
<IfModule ssl_module>
SSLStrictSNIVHostCheck on
</ifModule>
#NameVirtualHost *:80
#NameVirtualHost *:443
ServerName localhost
@ -160,7 +156,7 @@ LoadModule setenvif_module {{vars.apache.libexec_dir}}/mod_setenvif.so
#LoadModule session_dbd_module {{vars.apache.libexec_dir}}/mod_session_dbd.so
#LoadModule slotmem_shm_module {{vars.apache.libexec_dir}}/mod_slotmem_shm.so
#LoadModule slotmem_plain_module {{vars.apache.libexec_dir}}/mod_slotmem_plain.so
#LoadModule ssl_module {{vars.apache.libexec_dir}}/mod_ssl.so
LoadModule ssl_module {{vars.apache.libexec_dir}}/mod_ssl.so
#LoadModule dialup_module {{vars.apache.libexec_dir}}/mod_dialup.so
#LoadModule http2_module {{vars.apache.libexec_dir}}/mod_http2.so
#LoadModule proxy_http2_module {{vars.apache.libexec_dir}}/mod_proxy_http2.so