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

test_hbacrule_categories.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.
parent 762c6e4f
Branches
Tags
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
name: testrule name: testrule
usercategory: all usercategory: all
register: result register: result
failed_when: not result.changed failed_when: not result.changed or result.failed
- name: Ensure HBAC rule is present, with usercategory 'all', again. - name: Ensure HBAC rule is present, with usercategory 'all', again.
ipahbacrule: ipahbacrule:
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
name: testrule name: testrule
usercategory: all usercategory: all
register: result register: result
failed_when: result.changed failed_when: result.changed or result.failed
- name: Ensure HBAC rule is present, with no usercategory. - name: Ensure HBAC rule is present, with no usercategory.
ipahbacrule: ipahbacrule:
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
name: testrule name: testrule
usercategory: "" usercategory: ""
register: result register: result
failed_when: not result.changed failed_when: not result.changed or result.failed
- name: Ensure HBAC rule is present, with no usercategory, again. - name: Ensure HBAC rule is present, with no usercategory, again.
ipahbacrule: ipahbacrule:
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
name: testrule name: testrule
usercategory: "" usercategory: ""
register: result register: result
failed_when: result.changed failed_when: result.changed or result.failed
- name: Ensure HBAC rule is present, with hostcategory 'all' - name: Ensure HBAC rule is present, with hostcategory 'all'
ipahbacrule: ipahbacrule:
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
name: testrule name: testrule
hostcategory: all hostcategory: all
register: result register: result
failed_when: not result.changed failed_when: not result.changed or result.failed
- name: Ensure HBAC rule is present, with hostcategory 'all', again. - name: Ensure HBAC rule is present, with hostcategory 'all', again.
ipahbacrule: ipahbacrule:
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
name: testrule name: testrule
hostcategory: all hostcategory: all
register: result register: result
failed_when: result.changed failed_when: result.changed or result.failed
- name: Ensure HBAC rule is present, with no hostcategory. - name: Ensure HBAC rule is present, with no hostcategory.
ipahbacrule: ipahbacrule:
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
name: testrule name: testrule
hostcategory: "" hostcategory: ""
register: result register: result
failed_when: not result.changed failed_when: not result.changed or result.failed
- name: Ensure HBAC rule is present, with no hostcategory, again. - name: Ensure HBAC rule is present, with no hostcategory, again.
ipahbacrule: ipahbacrule:
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
name: testrule name: testrule
hostcategory: "" hostcategory: ""
register: result register: result
failed_when: result.changed failed_when: result.changed or result.failed
- name: Ensure HBAC rule is present, with servicecategory 'all' - name: Ensure HBAC rule is present, with servicecategory 'all'
ipahbacrule: ipahbacrule:
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
name: testrule name: testrule
servicecategory: all servicecategory: all
register: result register: result
failed_when: not result.changed failed_when: not result.changed or result.failed
- name: Ensure HBAC rule is present, with servicecategory 'all', again. - name: Ensure HBAC rule is present, with servicecategory 'all', again.
ipahbacrule: ipahbacrule:
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
name: testrule name: testrule
servicecategory: all servicecategory: all
register: result register: result
failed_when: result.changed failed_when: result.changed or result.failed
- name: Ensure HBAC rule is present, with no servicecategory. - name: Ensure HBAC rule is present, with no servicecategory.
ipahbacrule: ipahbacrule:
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
name: testrule name: testrule
servicecategory: "" servicecategory: ""
register: result register: result
failed_when: not result.changed failed_when: not result.changed or result.failed
- name: Ensure HBAC rule is present, with no servicecategory, again. - name: Ensure HBAC rule is present, with no servicecategory, again.
ipahbacrule: ipahbacrule:
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
name: testrule name: testrule
servicecategory: "" servicecategory: ""
register: result register: result
failed_when: result.changed failed_when: result.changed or result.failed
- name: Ensure `user` cannot be added if usercategory is `all`. - name: Ensure `user` cannot be added if usercategory is `all`.
ipahbacrule: ipahbacrule:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment