test_host_random.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:
Thomas Woerner
2021-05-20 13:16:26 +02:00
parent 5c66c5bd95
commit b8b89b8b1b

View File

@@ -31,7 +31,7 @@
force: yes
update_password: on_create
register: ipahost
failed_when: not ipahost.changed
failed_when: not ipahost.changed or ipahost.failed
- assert:
that:
@@ -60,7 +60,7 @@
force: yes
update_password: on_create
register: ipahost
failed_when: not ipahost.changed
failed_when: not ipahost.changed or ipahost.failed
- assert:
that:
@@ -85,7 +85,7 @@
random: yes
update_password: always
register: ipahost
failed_when: ipahost.changed
failed_when: ipahost.changed or not ipahost.failed
- assert:
that: