added 06-cleanup.yml

master
Niclas Thobaben 2021-12-27 21:47:11 +01:00
parent ec8af08f58
commit d7e6fd8445
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# Cleanup backed up files if all tests finished sucessfully
- name: Delete /etc/named.conf.local.bak
become: true
file:
path: /etc/bind/named.conf.local.bak
state: absent
- name: Delete all backed up zone files
become: true
shell: "rm {{bind9_zone_dir}}/*.bak"

View File

@ -11,6 +11,8 @@
loop_control:
loop_var: zone
- import_tasks: 06-cleanup.yml
rescue:
- import_tasks: 05-rollback.yml
when: not bind9_initial_setup