---
- name: Ensure test user is absent.
  ipauser:
    ipaadmin_password: SomeADMINpassword
    ipaapi_context: "{{ ipa_context | default(omit) }}"
    name:
    - user01
    - user02
    - user03
    state: absent

- name: Ensure test group is absent.
  ipagroup:
    ipaadmin_password: SomeADMINpassword
    ipaapi_context: "{{ ipa_context | default(omit) }}"
    name:
    - group01
    - group02
    state: absent

- name: Ensure test hostgroup is absent.
  ipahostgroup:
    ipaadmin_password: SomeADMINpassword
    ipaapi_context: "{{ ipa_context | default(omit) }}"
    name:
    - hostgroup01
    - hostgroup02
    state: absent

- name: Ensure test host is absent.
  ipahost:
    ipaadmin_password: SomeADMINpassword
    ipaapi_context: "{{ ipa_context | default(omit) }}"
    name:
    - "{{ host1_fqdn }}"
    - "{{ host2_fqdn }}"
    state: absent

- name: Ensure test service is absent.
  ipaservice:
    ipaadmin_password: SomeADMINpassword
    ipaapi_context: "{{ ipa_context | default(omit) }}"
    name:
    - "service01/{{ host1_fqdn }}"
    - "service02/{{ host2_fqdn }}"
    state: absent

- name: Ensure test roles are absent.
  iparole:
    ipaadmin_password: SomeADMINpassword
    ipaapi_context: "{{ ipa_context | default(omit) }}"
    name:
    - renamerole
    - testrole
    state: absent
