Simplify ipaclient uninstall

Currently ipaclient role is using the module ipaclient only for uninstallation,
and this module contains a lot of unused code.
It is simpler to directly call the command-line
   ipa-client-install --uninstall -U
and remove the ipaclient module.
This commit is contained in:
Florence Blanc-Renaud
2017-10-12 09:47:03 +02:00
parent 6998dc788e
commit a0b8bd39e0
2 changed files with 5 additions and 343 deletions

View File

@@ -6,8 +6,11 @@
static: yes
- name: Uninstall - Uninstall IPA client
ipaclient:
state: absent
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
changed_when: uninstall.rc == 0
#- name: Remove IPA client package
# package: