Skip to content

Commit

Permalink
Update register_logic example
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael DeHaan committed May 5, 2013
1 parent 777dbc1 commit 4569713
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/playbooks/register_logic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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


0 comments on commit 4569713

Please sign in to comment.