Added some dependencies and default values
This commit is contained in:
parent
c8a157ad49
commit
2a4534bfa4
17
apache.cf
17
apache.cf
|
@ -142,16 +142,18 @@ files:
|
|||
create => "true",
|
||||
edit_template => "$(sys.workdir)/inputs/$(def.mfdomain)/templates/httpd.conf.mustache",
|
||||
template_method => "mustache",
|
||||
handle => "apache_main_cfg_crreated",
|
||||
classes => if_repaired(apache_changed);
|
||||
|
||||
services:
|
||||
"$(apache.service_name)"
|
||||
depends_on => {"apache_editrc","apache_vhost_dir_created"},
|
||||
depends_on => {"apache_editrc","apache_vhost_dir_created","apache_www_dir_created","apache_main_cfg_crreated"},
|
||||
service_policy => "start",
|
||||
handle => "apache_running";
|
||||
|
||||
"php_changed|apache_changed"::
|
||||
"$(apache.service_name)"
|
||||
depends_on => {"apache_vhost_dir_created","apache_www_dir_created","apache_main_cfg_crreated"},
|
||||
service_policy => "restart";
|
||||
}
|
||||
|
||||
|
@ -164,12 +166,21 @@ commands:
|
|||
|
||||
|
||||
bundle agent apache_vhost
|
||||
(site)
|
||||
(site_param)
|
||||
{
|
||||
classes:
|
||||
"delete" expression => $(site[disable]);
|
||||
"use_ssl" expression => $(site[ssl]);
|
||||
vars:
|
||||
"site_defaults" data => '
|
||||
{
|
||||
"aliases":[],
|
||||
}
|
||||
';
|
||||
|
||||
"site" data => mergedata(site_defaults,site_param);
|
||||
|
||||
|
||||
"cert_file" string => "$(certbot.certbot_dir)/live/$(site[domain])";
|
||||
|
||||
"template_file"
|
||||
|
@ -206,7 +217,7 @@ files:
|
|||
|
||||
methods:
|
||||
use_ssl::
|
||||
"any" usebundle => certbot_cert(@(site),"$(apache.default_html_dir)","$(site[domain])"),
|
||||
"any" usebundle => certbot_cert(@(site),"$(apache.default_html_dir)"), #,"$(site[domain])"),
|
||||
handle => "apache_ssl_created$(site[domain])";
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue