Specify Apache and Nginx states

This commit is contained in:
Alex Kotov 2020-02-06 19:49:37 +05:00
parent 02e4c407c1
commit 24126d7a18
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 6 additions and 0 deletions

View file

@ -8,10 +8,12 @@ common__certbot__cert_domains: ['example.com', 'www.example.com']
common__certbot__post_hook: 'systemctl is-active nginx.service || systemctl start nginx.service' common__certbot__post_hook: 'systemctl is-active nginx.service || systemctl start nginx.service'
common__certbot__pre_hook: 'systemctl is-active nginx.service && systemctl stop nginx.service || true' common__certbot__pre_hook: 'systemctl is-active nginx.service && systemctl stop nginx.service || true'
common__nginx__state: install
common__nginx__remove_default: true common__nginx__remove_default: true
common__nginx__upstreams: [] common__nginx__upstreams: []
common__nginx__sites: [] common__nginx__sites: []
common__apache__state: install
common__apache__remove_default: true common__apache__remove_default: true
common__apache__listen: ['127.0.0.1:8080'] common__apache__listen: ['127.0.0.1:8080']
common__apache__modules: ['alias', 'cgid', 'env', 'rewrite', 'ssl'] common__apache__modules: ['alias', 'cgid', 'env', 'rewrite', 'ssl']

View file

@ -4,7 +4,11 @@
- include_tasks: ssh.yml - include_tasks: ssh.yml
- include_tasks: iptables.yml - include_tasks: iptables.yml
- include_tasks: certbot.yml - include_tasks: certbot.yml
- include_tasks: apache.yml - include_tasks: apache.yml
when: common__apache__state == 'install'
- meta: flush_handlers - meta: flush_handlers
- include_tasks: nginx.yml - include_tasks: nginx.yml
when: common__nginx__state == 'install'
- meta: flush_handlers - meta: flush_handlers