mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 20:04:45 +00:00
test_dnsconfig.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:
@@ -53,7 +53,7 @@
|
|||||||
forward_policy: only
|
forward_policy: only
|
||||||
allow_sync_ptr: yes
|
allow_sync_ptr: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Set dnsconfig, with the same values.
|
- name: Set dnsconfig, with the same values.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
forward_policy: only
|
forward_policy: only
|
||||||
allow_sync_ptr: yes
|
allow_sync_ptr: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure forwarder is absent.
|
- name: Ensure forwarder is absent.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
- ip_address: 8.8.8.8
|
- ip_address: 8.8.8.8
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure forwarder is absent, again.
|
- name: Ensure forwarder is absent, again.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
@@ -84,63 +84,63 @@
|
|||||||
- ip_address: 8.8.8.8
|
- ip_address: 8.8.8.8
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Disable global forwarders.
|
- name: Disable global forwarders.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
forward_policy: none
|
forward_policy: none
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Disable global forwarders, again.
|
- name: Disable global forwarders, again.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
forward_policy: none
|
forward_policy: none
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Re-enable global forwarders.
|
- name: Re-enable global forwarders.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
forward_policy: first
|
forward_policy: first
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Re-enable global forwarders, again.
|
- name: Re-enable global forwarders, again.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
forward_policy: first
|
forward_policy: first
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Disable PTR record synchronization.
|
- name: Disable PTR record synchronization.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
allow_sync_ptr: no
|
allow_sync_ptr: no
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Disable PTR record synchronization, again.
|
- name: Disable PTR record synchronization, again.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
allow_sync_ptr: no
|
allow_sync_ptr: no
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Re-enable PTR record synchronization.
|
- name: Re-enable PTR record synchronization.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
allow_sync_ptr: yes
|
allow_sync_ptr: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- name: Re-enable PTR record synchronization, again.
|
- name: Re-enable PTR record synchronization, again.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
allow_sync_ptr: yes
|
allow_sync_ptr: yes
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- name: Ensure all forwarders are absent.
|
- name: Ensure all forwarders are absent.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
port: 53
|
port: 53
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
|
|
||||||
- name: Ensure all forwarders are absent, again.
|
- name: Ensure all forwarders are absent, again.
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
port: 53
|
port: 53
|
||||||
state: absent
|
state: absent
|
||||||
register: result
|
register: result
|
||||||
failed_when: result.changed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
- name: Ensure forwarders are absent.
|
- name: Ensure forwarders are absent.
|
||||||
|
|||||||
Reference in New Issue
Block a user