Compare commits

..

No commits in common. "9d8d6cd332f6d9156c3022bd3333c535b03b8da5" and "1a781d9512f78d971e0a2f7c6e9bda3dfcff5d2e" have entirely different histories.

2 changed files with 5 additions and 43 deletions

View File

@ -13,19 +13,6 @@ centos::
"cfg_dir" string => "/etc/nginx"; "cfg_dir" string => "/etc/nginx";
"vhost_cfg_dir" string => "$(cfg_dir)/conf.d"; "vhost_cfg_dir" string => "$(cfg_dir)/conf.d";
"service_name" string => "nginx"; "service_name" string => "nginx";
debian::
"www_dir" string => "/var/www",unless => isvariable( $(this.promiser) ) ;
"www_user" string => "www-data";
"www_group" string => "www-data";
"cfg_dir" string => "/etc/nginx";
"vhost_cfg_dir" string => "$(cfg_dir)/conf.d";
"service_name" string => "nginx";
any::
"service_deps" slist => {
"nginx_pkgs_installed",
"nginx_www_dir_created",
};
any:: any::
@ -59,20 +46,13 @@ files:
create => "true", create => "true",
handle => "nginx_work_dir_created"; handle => "nginx_work_dir_created";
methods:
"any" usebundle => wmde_enable_service("nginx");
"any" usebundle => wmde_service("$(nginx.service_name)","nginx_kept","nginx_repaired"),
depends_on => @(nginx.service_deps) ;
commands: commands:
"/bin/sh" "/bin/sh"
args => "$(sys.workdir)/inputs/$(def.wmde_libdir)/scripts/del-files-not-in-list.sh $(nginx.vhost_cfg_dir) $(sys.workdir)/data/agent/nginx/domains.txt && echo dummy.conf > $(sys.workdir)/data/agent/nginx/domains.txt", args => "$(sys.workdir)/inputs/$(def.wmde_libdir)/scripts/del-files-not-in-list.sh $(nginx.vhost_cfg_dir) $(sys.workdir)/data/agent/nginx/domains.txt && echo dummy.conf > $(sys.workdir)/data/agent/nginx/domains.txt",
inform => "false", inform => "false",
handle => "nginx_vhost_dir_cleaned", handle => "nginx_vhost_dir_cleaned",
# depends_on => {"nginx_dummy_conf_created"}, # depends_on => {"apache_dummy_conf_created"},
contain => wmde_cmd_useshell; contain => wmde_cmd_useshell;
@ -92,7 +72,7 @@ classes:
"do_logrotate" expression => $(site[logrotate]); "do_logrotate" expression => $(site[logrotate]);
vars: vars:
# "email":$(nginx.admin_email), # "email":$(apache.admin_email),
"site_defaults" data => ' "site_defaults" data => '
{ {
@ -194,9 +174,9 @@ commands:
reports: reports:
# "SITE: $(site[domain]): $(site[logrotate])"; "SITE: $(site[domain]): $(site[logrotate])";
# "SF: @(site)"; "SF: @(site)";
# "DF $(domain_file)"; "DF $(domain_file)";
delete:: delete::
"DELETE TRUE"; "DELETE TRUE";
@ -211,19 +191,3 @@ reports:
} }
bundle agent nginx_vhosts(sites)
{
vars:
"idx" slist => getindices(@(sites));
methods:
"any" usebundle => nginx_vhost(@(sites[$(idx)]));
reports:
}

View File

@ -13,7 +13,6 @@ server {
alias {{vars.nginx.default_html_dir}}/.well-known/acme-challenge/; alias {{vars.nginx.default_html_dir}}/.well-known/acme-challenge/;
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
} }
{{{vars.nginx_vhost.site.raw}}}
} }
{{/vars.nginx_vhost.site.ssl}} {{/vars.nginx_vhost.site.ssl}}
@ -52,7 +51,6 @@ server {
# ssl_dhparam /etc/nginx/dhparam.pem; # ssl_dhparam /etc/nginx/dhparam.pem;
root {{vars.nginx_vhost.site.doc_root}}; root {{vars.nginx_vhost.site.doc_root}};
{{{vars.nginx_vhost.site.raw}}}
} }