mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-08 06:13:21 +00:00
Update service README file and add tests for executing plugin with
`ipaapi_context` set to `client`.
A new test playbook can be found at:
tests/service/test_service_client_context.yml
The new test file can be executed in a FreeIPA client host that is
not a server. In this case, it should be defined in the `ipaclients`
group, in the inventory file.
79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
---
|
|
# Cleanup tasks for the service module tests.
|
|
- name: Ensure services are absent.
|
|
ipaservice:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name:
|
|
- "HTTP/{{ svc_fqdn }}"
|
|
- "HTTP/{{ nohost_fqdn }}"
|
|
- HTTP/svc.ihavenodns.info
|
|
- HTTP/no.idontexist.local
|
|
- HTTP/no.idontexist.info
|
|
- "cifs/{{ host1_fqdn }}"
|
|
continue: yes
|
|
state: absent
|
|
|
|
- name: Ensure host "{{ svc_fqdn }}" is absent
|
|
ipahost:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name: "{{ svc_fqdn }}"
|
|
update_dns: yes
|
|
state: absent
|
|
|
|
- name: Ensure host is absent
|
|
ipahost:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name:
|
|
- "{{ host1_fqdn }}"
|
|
- "{{ host2_fqdn }}"
|
|
- "{{ nohost_fqdn }}"
|
|
- svc.ihavenodns.info
|
|
update_dns: no
|
|
state: absent
|
|
|
|
- name: Ensure testing users are absent.
|
|
ipauser:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name:
|
|
- user01
|
|
- user02
|
|
state: absent
|
|
|
|
- name: Ensure testing groups are absent.
|
|
ipagroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name:
|
|
- group01
|
|
- group02
|
|
state: absent
|
|
|
|
- name: Ensure testing hostgroup hostgroup01 is absent.
|
|
ipagroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name:
|
|
- hostgroup01
|
|
state: absent
|
|
|
|
- name: Ensure testing hostgroup hostgroup02 is absent.
|
|
ipagroup:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
name:
|
|
- hostgroup02
|
|
state: absent
|
|
|
|
- name: Remove IP address for "nohost" host.
|
|
ipadnsrecord:
|
|
ipaadmin_password: SomeADMINpassword
|
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
|
zone_name: "{{ test_domain }}."
|
|
name: nohost
|
|
del_all: yes
|
|
state: absent
|