Skip to content

Instantly share code, notes, and snippets.

@mjinks
Last active August 29, 2015 14:27
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 mjinks/80ec4971c9887fc7629b to your computer and use it in GitHub Desktop.
Save mjinks/80ec4971c9887fc7629b to your computer and use it in GitHub Desktop.
{% for key, args in salt['pillar.get']('bind:configured_zones', {}).iteritems() -%}
{%- set file = salt['pillar.get']("bind:available_zones:" ~ key ~ ":file", 'twork-filenotfound') %}
{% if args['type'] == "master" and file != 'twork-filenotfound' -%}
zones-{{ file }}:
file.managed:
- name: {{ map.named_directory }}/{{ file }}
- source: 'salt://bind/zones/{{ file }}'
- user: {{ salt['pillar.get']('bind:config:user', map.user) }}
- group: {{ salt['pillar.get']('bind:config:group', map.group) }}
- mode: {{ salt['pillar.get']('bind:config:mode', '644') }}
- watch_in:
- service: bind
- require:
- file: named_directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment