Files
ansible-freeipa/roles/ipaserver/tasks/uninstall.yml
David Sastre Medina 20e5338ad5 Fixes #17 Improve how tasks manage package installation
The use of squash_actions to invoke a package module, such as “yum”, to
only invoke the module once is deprecated, and will be removed in
Ansible 2.11.
Instead of relying on implicit squashing, tasks should instead supply
the list directly to the name, pkg or package parameter of the module.

See [1] for a reference to the upstream documentation.

The ipa-krb5 and ipa-sssd modules include *_packages variables in both
defaults/ and vars/, additionally, the list of packages in ipa-sssd differs
from one to the other.
Unify list of packages into vars/

[1]: https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.7.html#using-a-loop-on-a-package-module-via-squash-actions
2019-06-04 12:42:19 +02:00

24 lines
729 B
YAML

---
# tasks to uninstall IPA server
# - name: Uninstall - Include Python2/3 import test
# import: "{{ role_path }}/tasks/python_2_3_test.yml"
- name: Uninstall - Uninstall IPA server
command: >
/usr/sbin/ipa-server-install
--uninstall
-U
{{ '--ignore-topology-disconnect' if ipaserver_ignore_topology_disconnect
| bool else '' }}
{{ '--ignore-last-of-role' if ipaserver_ignore_last_of_role | bool else ''}}
register: uninstall
# 1 means that uninstall failed because IPA server was not configured
failed_when: uninstall.rc != 0 and uninstall.rc != 1
changed_when: uninstall.rc == 0
#- name: Remove IPA server packages
# package:
# name: "{{ ipaserver_packages }}"
# state: absent