Move uninstall tasks to its own file
This cleans up the main tasks file.
This commit is contained in:
parent
67e7142a94
commit
27999d407e
|
@ -1,33 +1,7 @@
|
|||
---
|
||||
- when: ipsec_uninstall_tunnels|bool or ipsec_upgrade_tunnels|bool
|
||||
block:
|
||||
- name: Find tunnel configurations to delete
|
||||
find:
|
||||
paths: /etc/ipsec.d/
|
||||
patterns: overcloud-*
|
||||
register: configs_to_delete
|
||||
|
||||
- name: Remove tunnel configurations
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ configs_to_delete.files }}"
|
||||
notify:
|
||||
- Restart ipsec
|
||||
|
||||
- name: Find policy configurations to delete
|
||||
find:
|
||||
paths: /etc/ipsec.d/policies/
|
||||
patterns: overcloud-*
|
||||
register: policies_to_delete
|
||||
|
||||
- name: Remove tunnel configurations
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ policies_to_delete.files }}"
|
||||
notify:
|
||||
- Restart ipsec
|
||||
- include: uninstall.yml
|
||||
|
||||
- when: not ipsec_uninstall_tunnels|bool or ipsec_upgrade_tunnels|bool
|
||||
block:
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- name: Find tunnel configurations to delete
|
||||
find:
|
||||
paths: /etc/ipsec.d/
|
||||
patterns: overcloud-*
|
||||
register: configs_to_delete
|
||||
|
||||
- name: Remove tunnel configurations
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ configs_to_delete.files }}"
|
||||
notify:
|
||||
- Restart ipsec
|
||||
|
||||
- name: Find policy configurations to delete
|
||||
find:
|
||||
paths: /etc/ipsec.d/policies/
|
||||
patterns: overcloud-*
|
||||
register: policies_to_delete
|
||||
|
||||
- name: Remove tunnel configurations
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ policies_to_delete.files }}"
|
||||
notify:
|
||||
- Restart ipsec
|
Loading…
Reference in New Issue