Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Assume the following variables are defined: foo, bar
- hello:
- cmd.run:
- - name: 'echo hello'
- {% if not foo == bar %}
- mystate:
- cmd.run:
- - name: 'echo mystate'
- {% endif %}
- world:
- cmd.run:
- - name: 'echo world'
- # Output when foo == bar
- testserver:
- Name: hello - Function: cmd.run - Result: True
- Name: mystate - Function: cmd.run - Result: True
- Name: world - Function: cmd.run - Result: True
- # Output when foo != bar
- testserver:
- Name: hello - Function: cmd.run - Result: True
- Name: world - Function: cmd.run - Result: True
- # Targeted output when foo != bar
- testserver:
- Name: hello - Function: cmd.run - Result: True
- Name: mystate - Function: cmd.run - Result: Clean
- Name: world - Function: cmd.run - Result: True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement