common/tasks/main.yml
2021-09-19 00:17:32 +05:00

33 lines
1.1 KiB
YAML

---
- include_tasks: basics.yml
- include_tasks: usability.yml
- include_tasks: ssh.yml
- meta: flush_handlers
- fail:
msg: 'Invalid `common__certbot__state`: {{ common__certbot__state }}'
when: (common__certbot__state != None) and
(common__certbot__state != 'purge') and
(common__certbot__state != 'remove') and
(common__certbot__state != 'install')
- include_tasks: certbot/purge.yml
when: common__certbot__state == 'purge'
- include_tasks: certbot/remove.yml
when: common__certbot__state == 'remove'
- include_tasks: certbot/install.yml
when: common__certbot__state == 'install'
- meta: flush_handlers
- fail:
msg: 'Invalid `common__nginx__state`: {{ common__nginx__state }}'
when: (common__nginx__state != None) and
(common__nginx__state != 'purge') and
(common__nginx__state != 'remove') and
(common__nginx__state != 'install')
- include_tasks: nginx/purge.yml
when: common__nginx__state == 'purge'
- include_tasks: nginx/remove.yml
when: common__nginx__state == 'remove'
- include_tasks: nginx/install.yml
when: common__nginx__state == 'install'
- meta: flush_handlers