mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 13:32:10 +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 }}"
|
"{{ result_ipareplica_prepare.config_master_host_name }}"
|
||||||
register: result_ipareplica_enable_ipa
|
register: result_ipareplica_enable_ipa
|
||||||
|
|
||||||
|
always:
|
||||||
- name: Install - Cleanup root IPA cache
|
- name: Install - Cleanup root IPA cache
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/root/.ipa_cache"
|
path: "/root/.ipa_cache"
|
||||||
state: absent
|
state: absent
|
||||||
when: result_ipareplica_enable_ipa.changed
|
|
||||||
|
|
||||||
always:
|
|
||||||
- name: Cleanup temporary files
|
- name: Cleanup temporary files
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
|
|||||||
@@ -446,12 +446,6 @@
|
|||||||
setup_ca: "{{ result_ipaserver_test.setup_ca }}"
|
setup_ca: "{{ result_ipaserver_test.setup_ca }}"
|
||||||
register: result_ipaserver_enable_ipa
|
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
|
- name: Install - Configure firewalld
|
||||||
ansible.builtin.command: >
|
ansible.builtin.command: >
|
||||||
firewall-cmd
|
firewall-cmd
|
||||||
@@ -480,6 +474,11 @@
|
|||||||
when: ipaserver_setup_firewalld | bool
|
when: ipaserver_setup_firewalld | bool
|
||||||
|
|
||||||
always:
|
always:
|
||||||
|
- name: Install - Cleanup root IPA cache
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/root/.ipa_cache"
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Cleanup temporary files
|
- name: Cleanup temporary files
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user