Skip to content
Snippets Groups Projects
Commit 3c357a2f authored by Thomas Woerner's avatar Thomas Woerner
Browse files

test_dnsforwardzone.yml: Add failed_when and repeated tests

One task is missing the verification of the test result, some other
tasks are not repeated to verify idempotency.
parent 0e11119f
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,16 @@
ipaadmin_password: SomeADMINpassword
name: example.com
state: absent
register: result
failed_when: not result.changed or result.failed
- name: ensure forwardzone example.com is absent, again.
ipadnsforwardzone:
ipaadmin_password: SomeADMINpassword
name: example.com
state: absent
register: result
failed_when: result.changed or result.failed
- name: ensure forwardzone example.com is created with minimal args
ipadnsforwardzone:
......@@ -139,6 +149,17 @@
register: result
failed_when: not result.changed
- name: ensure forwardzone example.com is created with minimal args, again
ipadnsforwardzone:
ipaadmin_password: SomeADMINpassword
state: present
name: example.com
skip_overlap_check: true
forwarders:
- ip_address: 8.8.8.8
register: result
failed_when: result.changed or result.failed
- name: add a forwarder to any existing ones
ipadnsforwardzone:
ipaadmin_password: SomeADMINpassword
......@@ -151,6 +172,18 @@
register: result
failed_when: not result.changed
- name: add a forwarder to any existing ones, again
ipadnsforwardzone:
ipaadmin_password: SomeADMINpassword
state: present
name: example.com
forwarders:
- ip_address: 4.4.4.4
port: 8053
action: member
register: result
failed_when: result.changed or result.failed
- name: check the list of forwarders is what we expect
ipadnsforwardzone:
ipaadmin_password: SomeADMINpassword
......@@ -175,6 +208,17 @@
register: result
failed_when: not result.changed
- name: remove a single forwarder, again
ipadnsforwardzone:
ipaadmin_password: SomeADMINpassword
state: absent
name: example.com
forwarders:
- ip_address: 8.8.8.8
action: member
register: result
failed_when: result.changed or result.failed
- name: check the list of forwarders is what we expect now
ipadnsforwardzone:
ipaadmin_password: SomeADMINpassword
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment