Skip to content

Instantly share code, notes, and snippets.

Created March 17, 2016 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/04bd82336f0d35f0dcf4 to your computer and use it in GitHub Desktop.
Save anonymous/04bd82336f0d35f0dcf4 to your computer and use it in GitHub Desktop.
httpd:
local.cmd.run:
- name: salt/beacon/minion7-01.cook.book/service/
- tgt: {{ data['data']['id'] }}
{% if data['data']['httpd']['running'] == True %}
- arg:
- 'echo "SERVICE HTTPD IS UP == {{ data['data']['httpd']['running'] }} =="'
{% else %}
- arg:
- 'echo "SERVICE IS DOWN" && service httpd start'
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment