mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-06 05:13:08 +00:00
ipareplica/server: Always cleanup root IPA cache
The cleanup of the root IPA cache was depending on the result of the ipaserver_enable_ipa and ipareplica_enable_ipa tasks. Instead of "when: something.changed" a handler should be used instead. As "/root/.ipa_cache" should be removed always (same in command line) the removal of the file has been moded into the always section and does not need a when anymore.
This commit is contained in:
@@ -759,13 +759,12 @@
|
||||
"{{ result_ipareplica_prepare.config_master_host_name }}"
|
||||
register: result_ipareplica_enable_ipa
|
||||
|
||||
always:
|
||||
- name: Install - Cleanup root IPA cache
|
||||
ansible.builtin.file:
|
||||
path: "/root/.ipa_cache"
|
||||
state: absent
|
||||
when: result_ipareplica_enable_ipa.changed
|
||||
|
||||
always:
|
||||
- name: Cleanup temporary files
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
|
||||
@@ -446,12 +446,6 @@
|
||||
setup_ca: "{{ result_ipaserver_test.setup_ca }}"
|
||||
register: result_ipaserver_enable_ipa
|
||||
|
||||
- name: Install - Cleanup root IPA cache
|
||||
ansible.builtin.file:
|
||||
path: "/root/.ipa_cache"
|
||||
state: absent
|
||||
when: result_ipaserver_enable_ipa.changed
|
||||
|
||||
- name: Install - Configure firewalld
|
||||
ansible.builtin.command: >
|
||||
firewall-cmd
|
||||
@@ -480,6 +474,11 @@
|
||||
when: ipaserver_setup_firewalld | bool
|
||||
|
||||
always:
|
||||
- name: Install - Cleanup root IPA cache
|
||||
ansible.builtin.file:
|
||||
path: "/root/.ipa_cache"
|
||||
state: absent
|
||||
|
||||
- name: Cleanup temporary files
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
|
||||
Reference in New Issue
Block a user