mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 03:44:41 +00:00
test_dnsrecord_full_records.yml: Use result.failed also for failed_when
For failed_when result.failed should be used to make sure that the task fails if there was an error.
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
zone_name: "{{ testzone }}"
|
zone_name: "{{ testzone }}"
|
||||||
a_rec: 192.168.122.101
|
a_rec: 192.168.122.101
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns A record for 'host01' is present, again
|
- name: Ensure that dns A record for 'host01' is present, again
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
zone_name: "{{ testzone }}"
|
zone_name: "{{ testzone }}"
|
||||||
a_rec: 192.168.122.101
|
a_rec: 192.168.122.101
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns A records for 'host01' are present
|
- name: Ensure that dns A records for 'host01' are present
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
- 192.168.122.102
|
- 192.168.122.102
|
||||||
- 192.168.122.103
|
- 192.168.122.103
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns A records for 'host01' are present, again
|
- name: Ensure that dns A records for 'host01' are present, again
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
- 192.168.122.102
|
- 192.168.122.102
|
||||||
- 192.168.122.103
|
- 192.168.122.103
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns A records for 'host01' are absent
|
- name: Ensure that dns A records for 'host01' are absent
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
- 192.168.122.102
|
- 192.168.122.102
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns A records for 'host01' are absent, again
|
- name: Ensure that dns A records for 'host01' are absent, again
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
- 192.168.122.102
|
- 192.168.122.102
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
zone_name: "{{ testzone }}"
|
zone_name: "{{ testzone }}"
|
||||||
aaaa_rec: fd00::0001
|
aaaa_rec: fd00::0001
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns AAAA record for 'host01' is present, again
|
- name: Ensure that dns AAAA record for 'host01' is present, again
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
zone_name: "{{ testzone }}"
|
zone_name: "{{ testzone }}"
|
||||||
aaaa_rec: fd00::0001
|
aaaa_rec: fd00::0001
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns AAAA records for 'host01' are present
|
- name: Ensure that dns AAAA records for 'host01' are present
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
- fd00::0011
|
- fd00::0011
|
||||||
- fd00::0021
|
- fd00::0021
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns AAAAA records for 'host01' are present, again
|
- name: Ensure that dns AAAAA records for 'host01' are present, again
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
- fd00::0011
|
- fd00::0011
|
||||||
- fd00::0021
|
- fd00::0021
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns AAAAA records for 'host01' are absent
|
- name: Ensure that dns AAAAA records for 'host01' are absent
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
- fd00::0011
|
- fd00::0011
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure that dns AAAAA records for 'host01' are absent, again
|
- name: Ensure that dns AAAAA records for 'host01' are absent, again
|
||||||
ipadnsrecord:
|
ipadnsrecord:
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
- fd00::0011
|
- fd00::0011
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
- name: Cleanup test environment.
|
- name: Cleanup test environment.
|
||||||
|
|||||||
Reference in New Issue
Block a user