Skip to content

Instantly share code, notes, and snippets.

@briner
Created December 19, 2016 13:12
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 briner/4453a3e644a942347549f2afe9f469ff to your computer and use it in GitHub Desktop.
Save briner/4453a3e644a942347549f2afe9f469ff to your computer and use it in GitHub Desktop.
{% set ipv6_enabled = False %}
{% for ip in grains["ipv6"] %}
{% if ip[:12] in ["fd69:620:600", "2001:620:600"] %}
{% set ipv6_enabled = True %}
{% endif %}
{% endfor %}
/etc/salt/minion.d/central-it_master.conf:
file.managed:
{% if ipv6_enabled %}
- source: salt://minion/files/central-it_master.conf.ipv6
{% else %}
- source: salt://minion/files/central-it_master.conf.ipv4
{% endif %}
- user: root
- group: root
- mode: 644
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment