mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-02 12:54:52 +00:00
roles/ipaclient/tasks/install.yml: ccache cleanup, new always clause
Add big block has been added that contains all steps where the ccache is created an used. With the block it is possible to add an always clause to remove the ccachae also in the error case. The cleanup of the ccache is also done in the beginning to make sure that no ccache leftover will be used.
This commit is contained in:
@@ -21,6 +21,11 @@
|
|||||||
ipaadmin_principal: admin
|
ipaadmin_principal: admin
|
||||||
when: ipaadmin_principal is undefined and ipaclient_keytab is undefined
|
when: ipaadmin_principal is undefined and ipaclient_keytab is undefined
|
||||||
|
|
||||||
|
- name: Install - Cleanup leftover ccache
|
||||||
|
file:
|
||||||
|
path: "/etc/ipa/.dns_ccache"
|
||||||
|
state: absent
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Install - Test if IPA client has working krb5.keytab
|
- name: Install - Test if IPA client has working krb5.keytab
|
||||||
ipatest:
|
ipatest:
|
||||||
@@ -38,6 +43,7 @@
|
|||||||
ipaclient_use_otp: "no"
|
ipaclient_use_otp: "no"
|
||||||
when: ipaclient_use_otp | bool and ipatest.krb5_keytab_ok
|
when: ipaclient_use_otp | bool and ipatest.krb5_keytab_ok
|
||||||
|
|
||||||
|
|
||||||
# The following block is executed when using OTP to enroll IPA client
|
# The following block is executed when using OTP to enroll IPA client
|
||||||
# ie when ipaclient_use_otp is set.
|
# ie when ipaclient_use_otp is set.
|
||||||
# It connects to ipaserver and add the host with --random option in order
|
# It connects to ipaserver and add the host with --random option in order
|
||||||
@@ -103,7 +109,7 @@
|
|||||||
when: not ipatest.krb5_keytab_ok or ipaclient_force_join
|
when: not ipatest.krb5_keytab_ok or ipaclient_force_join
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Install - Cleanup ccache, end playbook processing
|
- name: Install - End playbook processing
|
||||||
file:
|
file:
|
||||||
path: "/etc/ipa/.dns_ccache"
|
path: "/etc/ipa/.dns_ccache"
|
||||||
state: absent
|
state: absent
|
||||||
@@ -198,3 +204,10 @@
|
|||||||
#no_nisdomain: no
|
#no_nisdomain: no
|
||||||
#nisdomain:
|
#nisdomain:
|
||||||
#on_master: no
|
#on_master: no
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: Cleanup leftover ccache
|
||||||
|
file:
|
||||||
|
path: "/etc/ipa/.dns_ccache"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user