mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #4771 Add 1.4.x example of registered var properties to the docsite
This commit is contained in:
parent
36ca726258
commit
dc74e700ce
1 changed files with 9 additions and 4 deletions
|
@ -144,16 +144,21 @@ The following tasks are illustrative of how filters can be used with conditional
|
||||||
- debug: msg="it failed"
|
- debug: msg="it failed"
|
||||||
when: result|failed
|
when: result|failed
|
||||||
|
|
||||||
# in most cases you'll want a handler, but if you want to do something right now, this is nice
|
|
||||||
- debug: msg="it changed"
|
|
||||||
when: result|changed
|
|
||||||
|
|
||||||
- debug: msg="it succeeded"
|
- debug: msg="it succeeded"
|
||||||
when: result|success
|
when: result|success
|
||||||
|
|
||||||
- debug: msg="it was skipped"
|
- debug: msg="it was skipped"
|
||||||
when: result|skipped
|
when: result|skipped
|
||||||
|
|
||||||
|
# in most cases you'll want a handler, but if you want to do something right now, this is nice
|
||||||
|
- debug: msg="it changed"
|
||||||
|
when: result|changed
|
||||||
|
|
||||||
|
# in 1.4 and above, properties of registered variables can be called as well;
|
||||||
|
# eliminating the need to use filters in some cases.
|
||||||
|
- debug: msg="it changed"
|
||||||
|
when: result.changed
|
||||||
|
|
||||||
.. _forcing_variables_to_be_defined:
|
.. _forcing_variables_to_be_defined:
|
||||||
|
|
||||||
Forcing Variables To Be Defined
|
Forcing Variables To Be Defined
|
||||||
|
|
Loading…
Reference in a new issue