Validate states
This commit is contained in:
parent
37a5a96b25
commit
69c5691729
|
@ -4,24 +4,40 @@
|
|||
- include_tasks: ssh.yml
|
||||
- meta: flush_handlers
|
||||
|
||||
- fail:
|
||||
msg: 'Invalid `common__iptables__state`: {{ common__iptables__state }}'
|
||||
when: (common__iptables__state != 'purge') and
|
||||
(common__iptables__state != 'install')
|
||||
- include_tasks: iptables/purge.yml
|
||||
when: common__iptables__state == 'purge'
|
||||
- include_tasks: iptables/install.yml
|
||||
when: common__iptables__state == 'install'
|
||||
- meta: flush_handlers
|
||||
|
||||
- fail:
|
||||
msg: 'Invalid `common__certbot__state`: {{ common__certbot__state }}'
|
||||
when: (common__certbot__state != 'purge') and
|
||||
(common__certbot__state != 'install')
|
||||
- include_tasks: certbot/purge.yml
|
||||
when: common__certbot__state == 'purge'
|
||||
- include_tasks: certbot/install.yml
|
||||
when: common__certbot__state == 'install'
|
||||
- meta: flush_handlers
|
||||
|
||||
- fail:
|
||||
msg: 'Invalid `common__apache__state`: {{ common__apache__state }}'
|
||||
when: (common__apache__state != 'purge') and
|
||||
(common__apache__state != 'install')
|
||||
- include_tasks: apache/purge.yml
|
||||
when: common__apache__state == 'purge'
|
||||
- include_tasks: apache/install.yml
|
||||
when: common__apache__state == 'install'
|
||||
- meta: flush_handlers
|
||||
|
||||
- fail:
|
||||
msg: 'Invalid `common__nginx__state`: {{ common__nginx__state }}'
|
||||
when: (common__nginx__state != 'purge') and
|
||||
(common__nginx__state != 'install')
|
||||
- include_tasks: nginx/purge.yml
|
||||
when: common__nginx__state == 'purge'
|
||||
- include_tasks: nginx/install.yml
|
||||
|
|
Loading…
Reference in New Issue