Skip to content

Instantly share code, notes, and snippets.

@aleszoulek
Created October 11, 2012 10:01
Show Gist options
  • Save aleszoulek/3871364 to your computer and use it in GitHub Desktop.
Save aleszoulek/3871364 to your computer and use it in GitHub Desktop.
{% set source = 'default' %}
{% if grains['a'] == foo %}
{% set source = 'foo' %}
{% endif %}
/a/b/c.conf:
file.managed:
- source: salt://{{ source }}
- mode: 0700
- user: root
include:
- general
{% if grains['b'] == 'bar' and grains['a'] == foo %}
{% set source = 'foobar' %}
extend:
/a/b/c.conf:
file:
- source: salt://{{ source }}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment