Files
ansible-freeipa/tests/dnsconfig/test_dnsconfig_forwarders_ports.yml
Thomas Woerner 2a1ecdbd83 yamllint: All tasks need to be named
yamllint is failing for unnamed tasks. All block and include_tasks tasks
are now named.
2023-01-11 15:27:35 +01:00

83 lines
2.4 KiB
YAML

---
- name: Test dnsconfig forwarders with custom ports
hosts: "{{ ipa_test_host | default('ipaserver') }}"
become: true
gather_facts: no
tasks:
- name: Test dnsconfig forwarders ports
block:
# Setup.
- name: Ensure forwarder with custom port is absent.
ipadnsconfig:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
forwarders:
- ip_address: 2001:4860:4860::8888
port: 53
state: absent
action: member
# Tests.
- name: Ensure forwarder with custom port is present.
ipadnsconfig:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
forwarders:
- ip_address: 2001:4860:4860::8888
port: 53
state: present
action: member
register: result
failed_when: not result.changed or result.failed
- name: Ensure forwarder with custom port is present, again.
ipadnsconfig:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
forwarders:
- ip_address: 2001:4860:4860::8888
port: 53
state: present
action: member
register: result
failed_when: result.changed or result.failed
- name: Ensure forwarder with custom port is absent.
ipadnsconfig:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
forwarders:
- ip_address: 2001:4860:4860::8888
port: 53
state: absent
action: member
register: result
failed_when: not result.changed or result.failed
- name: Ensure forwarder with custom port is absent, again.
ipadnsconfig:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
forwarders:
- ip_address: 2001:4860:4860::8888
port: 53
state: absent
action: member
register: result
failed_when: result.changed or result.failed
always:
# Cleanup.
- name: Ensure forwarder with custom port is absent.
ipadnsconfig:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
forwarders:
- ip_address: 2001:4860:4860::8888
port: 53
state: absent
action: member