Purge Nginx

This commit is contained in:
Alex Kotov 2020-02-06 19:57:24 +05:00
parent 2d83a2aa36
commit d701755996
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 13 additions and 0 deletions

View file

@ -11,6 +11,8 @@
when: common__apache__state == 'install'
- meta: flush_handlers
- include_tasks: nginx/purge.yml
when: common__nginx__state == 'purge'
- include_tasks: nginx/install.yml
when: common__nginx__state == 'install'
- meta: flush_handlers

11
tasks/nginx/purge.yml Normal file
View file

@ -0,0 +1,11 @@
---
- name: Purge Nginx
apt:
name: nginx
state: absent
purge: true
- name: Delete Nginx configuration
file:
state: absent
path: '{{ common__nginx__conf_dir }}'