mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 19:34:45 +00:00
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.
This commit is contained in:
@@ -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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user