Advertisement
Guest User

Untitled

a guest
Feb 26th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.75 KB | None | 0 0
  1. # Assume the following variables are defined: foo, bar
  2. hello:
  3.   cmd.run:
  4.     - name: 'echo hello'
  5. {% if not foo == bar %}
  6. mystate:
  7.   cmd.run:
  8.     - name: 'echo mystate'
  9. {% endif %}
  10. world:
  11.   cmd.run:
  12.     - name: 'echo world'
  13.  
  14. # Output when foo == bar
  15. testserver:
  16.   Name: hello - Function: cmd.run - Result: True
  17.   Name: mystate - Function: cmd.run - Result: True
  18.   Name: world - Function: cmd.run - Result: True
  19.  
  20. # Output when foo != bar
  21. testserver:
  22.   Name: hello - Function: cmd.run - Result: True
  23.   Name: world - Function: cmd.run - Result: True
  24.  
  25. # Targeted output when foo != bar
  26. testserver:
  27.   Name: hello - Function: cmd.run - Result: True
  28.   Name: mystate - Function: cmd.run - Result: Clean
  29.   Name: world - Function: cmd.run - Result: True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement