Skip to content

Instantly share code, notes, and snippets.

@inthecloud247
Forked from godber/gist:5777861
Created June 14, 2013 05:04
Show Gist options
  • Save inthecloud247/5779576 to your computer and use it in GitHub Desktop.
Save inthecloud247/5779576 to your computer and use it in GitHub Desktop.
salt-minion:
pkg:
- installed
service:
- running
- require:
- pkg: salt-minion
- watch:
- file: /etc/salt/minion.d/grains.conf
/etc/salt/minion.d/grains.conf:
file:
- managed
{% if salt['cp.hash_file']('salt://minion/' + grains['id'] + '.conf') %}
- source: {{'salt://minion/' + grains['id'] + '.conf'}}
{% else %}
- source: salt://minion/default.conf
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment