Allow to uninstall packages without purges
This commit is contained in:
parent
69c5691729
commit
92acb72929
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Uninstall Apache
|
||||||
|
apt:
|
||||||
|
state: absent
|
||||||
|
purge: false
|
||||||
|
name:
|
||||||
|
- apache2
|
||||||
|
- apache2-bin
|
||||||
|
- apache2-data
|
||||||
|
- apache2-utils
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: Uninstall Certbot
|
||||||
|
apt:
|
||||||
|
name: certbot
|
||||||
|
state: absent
|
||||||
|
purge: false
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- name: Uninstall iptables-persistent
|
||||||
|
apt:
|
||||||
|
state: absent
|
||||||
|
purge: false
|
||||||
|
name:
|
||||||
|
- iptables-persistent
|
||||||
|
- netfilter-persistent
|
|
@ -7,9 +7,12 @@
|
||||||
- fail:
|
- fail:
|
||||||
msg: 'Invalid `common__iptables__state`: {{ common__iptables__state }}'
|
msg: 'Invalid `common__iptables__state`: {{ common__iptables__state }}'
|
||||||
when: (common__iptables__state != 'purge') and
|
when: (common__iptables__state != 'purge') and
|
||||||
|
(common__iptables__state != 'remove') and
|
||||||
(common__iptables__state != 'install')
|
(common__iptables__state != 'install')
|
||||||
- include_tasks: iptables/purge.yml
|
- include_tasks: iptables/purge.yml
|
||||||
when: common__iptables__state == 'purge'
|
when: common__iptables__state == 'purge'
|
||||||
|
- include_tasks: iptables/remove.yml
|
||||||
|
when: common__iptables__state == 'remove'
|
||||||
- include_tasks: iptables/install.yml
|
- include_tasks: iptables/install.yml
|
||||||
when: common__iptables__state == 'install'
|
when: common__iptables__state == 'install'
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
@ -17,9 +20,12 @@
|
||||||
- fail:
|
- fail:
|
||||||
msg: 'Invalid `common__certbot__state`: {{ common__certbot__state }}'
|
msg: 'Invalid `common__certbot__state`: {{ common__certbot__state }}'
|
||||||
when: (common__certbot__state != 'purge') and
|
when: (common__certbot__state != 'purge') and
|
||||||
|
(common__certbot__state != 'remove') and
|
||||||
(common__certbot__state != 'install')
|
(common__certbot__state != 'install')
|
||||||
- include_tasks: certbot/purge.yml
|
- include_tasks: certbot/purge.yml
|
||||||
when: common__certbot__state == 'purge'
|
when: common__certbot__state == 'purge'
|
||||||
|
- include_tasks: certbot/remove.yml
|
||||||
|
when: common__certbot__state == 'remove'
|
||||||
- include_tasks: certbot/install.yml
|
- include_tasks: certbot/install.yml
|
||||||
when: common__certbot__state == 'install'
|
when: common__certbot__state == 'install'
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
@ -27,9 +33,12 @@
|
||||||
- fail:
|
- fail:
|
||||||
msg: 'Invalid `common__apache__state`: {{ common__apache__state }}'
|
msg: 'Invalid `common__apache__state`: {{ common__apache__state }}'
|
||||||
when: (common__apache__state != 'purge') and
|
when: (common__apache__state != 'purge') and
|
||||||
|
(common__apache__state != 'remove') and
|
||||||
(common__apache__state != 'install')
|
(common__apache__state != 'install')
|
||||||
- include_tasks: apache/purge.yml
|
- include_tasks: apache/purge.yml
|
||||||
when: common__apache__state == 'purge'
|
when: common__apache__state == 'purge'
|
||||||
|
- include_tasks: apache/remove.yml
|
||||||
|
when: common__apache__state == 'remove'
|
||||||
- include_tasks: apache/install.yml
|
- include_tasks: apache/install.yml
|
||||||
when: common__apache__state == 'install'
|
when: common__apache__state == 'install'
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
@ -37,9 +46,12 @@
|
||||||
- fail:
|
- fail:
|
||||||
msg: 'Invalid `common__nginx__state`: {{ common__nginx__state }}'
|
msg: 'Invalid `common__nginx__state`: {{ common__nginx__state }}'
|
||||||
when: (common__nginx__state != 'purge') and
|
when: (common__nginx__state != 'purge') and
|
||||||
|
(common__nginx__state != 'remove') and
|
||||||
(common__nginx__state != 'install')
|
(common__nginx__state != 'install')
|
||||||
- include_tasks: nginx/purge.yml
|
- include_tasks: nginx/purge.yml
|
||||||
when: common__nginx__state == 'purge'
|
when: common__nginx__state == 'purge'
|
||||||
|
- include_tasks: nginx/remove.yml
|
||||||
|
when: common__nginx__state == 'remove'
|
||||||
- include_tasks: nginx/install.yml
|
- include_tasks: nginx/install.yml
|
||||||
when: common__nginx__state == 'install'
|
when: common__nginx__state == 'install'
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: Uninstall Nginx
|
||||||
|
apt:
|
||||||
|
state: absent
|
||||||
|
purge: false
|
||||||
|
name:
|
||||||
|
- nginx
|
||||||
|
- nginx-common
|
||||||
|
- nginx-core
|
Loading…
Reference in New Issue