Change states to use short-dec style

This commit is contained in:
Seth House 2014-12-13 00:19:58 -07:00
parent b7da1a30ef
commit 0de2c1bed0
2 changed files with 12 additions and 24 deletions

View file

@ -15,8 +15,7 @@ named_directory:
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' %}
bind_config: bind_config:
file: file.managed:
- managed
- name: {{ map.config }} - name: {{ map.config }}
- source: 'salt://bind/files/redhat/named.conf' - source: 'salt://bind/files/redhat/named.conf'
- template: jinja - template: jinja
@ -29,8 +28,7 @@ bind_config:
- service: bind - service: bind
bind_local_config: bind_local_config:
file: file.managed:
- managed
- name: {{ map.local_config }} - name: {{ map.local_config }}
- source: 'salt://bind/files/redhat/named.conf.local' - source: 'salt://bind/files/redhat/named.conf.local'
- template: jinja - template: jinja
@ -45,8 +43,7 @@ bind_local_config:
{% if grains['os_family'] == 'Debian' %} {% if grains['os_family'] == 'Debian' %}
bind_config: bind_config:
file: file.managed:
- managed
- name: {{ map.config }} - name: {{ map.config }}
- source: 'salt://bind/files/debian/named.conf' - source: 'salt://bind/files/debian/named.conf'
- template: jinja - template: jinja
@ -59,8 +56,7 @@ bind_config:
- service: bind - service: bind
bind_key_config: bind_key_config:
file: file.managed:
- managed
- name: {{ map.key_config }} - name: {{ map.key_config }}
- source: 'salt://bind/files/debian/named.conf.key' - source: 'salt://bind/files/debian/named.conf.key'
- template: jinja - template: jinja
@ -73,8 +69,7 @@ bind_key_config:
- service: bind - service: bind
bind_local_config: bind_local_config:
file: file.managed:
- managed
- name: {{ map.local_config }} - name: {{ map.local_config }}
- source: 'salt://bind/files/debian/named.conf.local' - source: 'salt://bind/files/debian/named.conf.local'
- template: jinja - template: jinja
@ -89,8 +84,7 @@ bind_local_config:
- service: bind - service: bind
bind_options_config: bind_options_config:
file: file.managed:
- managed
- name: {{ map.options_config }} - name: {{ map.options_config }}
- source: 'salt://bind/files/debian/named.conf.options' - source: 'salt://bind/files/debian/named.conf.options'
- template: jinja - template: jinja
@ -103,8 +97,7 @@ bind_options_config:
- service: bind - service: bind
bind_default_zones: bind_default_zones:
file: file.managed:
- managed
- name: {{ map.default_zones_config }} - name: {{ map.default_zones_config }}
- source: 'salt://bind/files/debian/named.conf.default-zones' - source: 'salt://bind/files/debian/named.conf.default-zones'
- template: jinja - template: jinja
@ -117,8 +110,7 @@ bind_default_zones:
- service: bind - service: bind
{{ map.log_dir }}: {{ map.log_dir }}:
file: file.directory:
- directory
- user: root - user: root
- group: bind - group: bind
- mode: 775 - mode: 775
@ -126,8 +118,7 @@ bind_default_zones:
/etc/logrotate.d/{{ map.service }}: /etc/logrotate.d/{{ map.service }}:
file: file.managed:
- managed
- source: salt://bind/files/debian/logrotate_bind - source: salt://bind/files/debian/logrotate_bind
- template: jinja - template: jinja
- user: root - user: root
@ -142,8 +133,7 @@ bind_default_zones:
{%- set file = salt['pillar.get']("available_zones:" + key + ":file") %} {%- set file = salt['pillar.get']("available_zones:" + key + ":file") %}
{% if args['type'] == "master" -%} {% if args['type'] == "master" -%}
zones-{{ file }}: zones-{{ file }}:
file: file.managed:
- managed
- name: {{ map.named_directory }}/{{ file }} - name: {{ map.named_directory }}/{{ file }}
- source: 'salt://bind/zones/{{ file }}' - source: 'salt://bind/zones/{{ file }}'
- user: {{ salt['pillar.get']('bind:config:user', map.user) }} - user: {{ salt['pillar.get']('bind:config:user', map.user) }}

View file

@ -1,11 +1,9 @@
{% from "bind/map.jinja" import map with context %} {% from "bind/map.jinja" import map with context %}
bind: bind:
pkg: pkg.installed:
- installed
- pkgs: {{ map.pkgs|json }} - pkgs: {{ map.pkgs|json }}
service: service.running:
- running
- name: {{ map.service }} - name: {{ map.service }}
- enable: True - enable: True
- reload: True - reload: True