Skip to content

Instantly share code, notes, and snippets.

@trane
Created March 14, 2012 00:40
Show Gist options
  • Save trane/2033017 to your computer and use it in GitHub Desktop.
Save trane/2033017 to your computer and use it in GitHub Desktop.
[ david@samwise ] $ cat salt.sls
/etc/salt/minion:
file:
- managed
- owner: root
- group: root
- mode: 444
- source: salt://salt/files/salt-minion.config
- template: jinja
- context: {
modules_dirs:
{% if grains['fqdn'] == 'clients.foo.bar'%}
"/home/core/modules"
{% else %}
"/opt/salt/modules"
{% endif %}
}
[ david@samwise ] $ cat salt-minion.config
master: ctl.foo.bar
modules_dirs: {{ modules_dirs }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment