roles/ipaclient/tasks/[un]install.yml: Use better formatting for commands

This commit is contained in:
Thomas Woerner
2017-11-09 13:19:08 +01:00
parent 11bf327c64
commit 7b51df6c33
2 changed files with 8 additions and 2 deletions

View File

@@ -90,7 +90,10 @@
when: not ipatest.krb5_keytab_ok and (ipaadmin_password is undefined or ipaadmin_password == "") and (ipaclient_keytab is undefined or ipaclient_keytab == "")
- name: Install - Purge {{ ipadiscovery.realm }} from host keytab
command: /usr/sbin/ipa-rmkeytab -k /etc/krb5.keytab -r "{{ ipadiscovery.realm }}"
command: >
/usr/sbin/ipa-rmkeytab
-k /etc/krb5.keytab
-r "{{ ipadiscovery.realm }}"
register: iparmkeytab
# Do not fail on error codes 3 and 5:
# 3 - Unable to open keytab

View File

@@ -6,7 +6,10 @@
static: yes
- name: Uninstall - Uninstall IPA client
command: /usr/sbin/ipa-client-install --uninstall -U
command: >
/usr/sbin/ipa-client-install
--uninstall
-U
register: uninstall
# 2 means that uninstall failed because IPA client was not configured
failed_when: uninstall.rc != 0 and uninstall.rc != 2