Skip to content

Instantly share code, notes, and snippets.

@sjmh
Created October 24, 2016 18:29
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 sjmh/7a98cf88818b0e2975f7fe3decd65c58 to your computer and use it in GitHub Desktop.
Save sjmh/7a98cf88818b0e2975f7fe3decd65c58 to your computer and use it in GitHub Desktop.
minion_service:
service.running:
- enable: True
- name: salt-minion
cmd.run:
{% if grains['osmajorrelease'] == '7' %}
- name: echo systemctl restart salt-minion | at now + 5 minute
{% else %}
- name: echo service salt-minion restart | at now + 5 minute
{% endif %}
- require:
- pkg: at
- service: at
- onchanges:
- file: /etc/salt/minion.d/master.conf
- file: /etc/salt/minion.d/mine.conf
at:
pkg.installed:
- name: at
service.running:
- name: atd
- enable: True
- require:
- pkg: at
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment