mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-26 08:26:28 +00:00
Update register_logic example
This commit is contained in:
@@ -23,6 +23,11 @@
|
||||
# here we run the next action only if the previous grep returned true
|
||||
|
||||
- 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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user