mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update register_logic example
This commit is contained in:
parent
777dbc1048
commit
4569713d88
1 changed files with 6 additions and 1 deletions
|
@ -23,6 +23,11 @@
|
||||||
# here we run the next action only if the previous grep returned true
|
# here we run the next action only if the previous grep returned true
|
||||||
|
|
||||||
- action: shell echo "motd contains the word hi"
|
- action: shell echo "motd contains the word hi"
|
||||||
only_if: "${motd_result.rc} == 0"
|
when: motd_result.rc == 0
|
||||||
|
|
||||||
|
# alternatively:
|
||||||
|
|
||||||
|
- action: shell echo "motd contains the word hi"
|
||||||
|
when: motd_result.stdout.find('hi') != -1
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue