Skip to content
Snippets Groups Projects
Commit 92b824d8 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

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.
parent 895a8877
Branches
Tags
No related merge requests found
...@@ -21,6 +21,11 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment