Purge Apache

This commit is contained in:
Alex Kotov 2020-02-06 19:55:41 +05:00
parent 9b07acfdd4
commit 2d83a2aa36
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 13 additions and 0 deletions

11
tasks/apache/purge.yml Normal file
View File

@ -0,0 +1,11 @@
---
- name: Purge Apache
apt:
name: apache2
state: absent
purge: true
- name: Delete Apache configuration
file:
state: absent
path: '{{ common__apache__conf_dir }}'

View File

@ -5,6 +5,8 @@
- include_tasks: iptables.yml
- include_tasks: certbot.yml
- include_tasks: apache/purge.yml
when: common__apache__state == 'purge'
- include_tasks: apache/install.yml
when: common__apache__state == 'install'
- meta: flush_handlers