From 0de2c1bed054026001f7dc468dc3e7268ad5b331 Mon Sep 17 00:00:00 2001 From: Seth House Date: Sat, 13 Dec 2014 00:19:58 -0700 Subject: [PATCH] Change states to use short-dec style --- bind/config.sls | 30 ++++++++++-------------------- bind/init.sls | 6 ++---- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/bind/config.sls b/bind/config.sls index 8bb5771..98fef95 100644 --- a/bind/config.sls +++ b/bind/config.sls @@ -15,8 +15,7 @@ named_directory: {% if grains['os_family'] == 'RedHat' %} bind_config: - file: - - managed + file.managed: - name: {{ map.config }} - source: 'salt://bind/files/redhat/named.conf' - template: jinja @@ -29,8 +28,7 @@ bind_config: - service: bind bind_local_config: - file: - - managed + file.managed: - name: {{ map.local_config }} - source: 'salt://bind/files/redhat/named.conf.local' - template: jinja @@ -45,8 +43,7 @@ bind_local_config: {% if grains['os_family'] == 'Debian' %} bind_config: - file: - - managed + file.managed: - name: {{ map.config }} - source: 'salt://bind/files/debian/named.conf' - template: jinja @@ -59,8 +56,7 @@ bind_config: - service: bind bind_key_config: - file: - - managed + file.managed: - name: {{ map.key_config }} - source: 'salt://bind/files/debian/named.conf.key' - template: jinja @@ -73,8 +69,7 @@ bind_key_config: - service: bind bind_local_config: - file: - - managed + file.managed: - name: {{ map.local_config }} - source: 'salt://bind/files/debian/named.conf.local' - template: jinja @@ -89,8 +84,7 @@ bind_local_config: - service: bind bind_options_config: - file: - - managed + file.managed: - name: {{ map.options_config }} - source: 'salt://bind/files/debian/named.conf.options' - template: jinja @@ -103,8 +97,7 @@ bind_options_config: - service: bind bind_default_zones: - file: - - managed + file.managed: - name: {{ map.default_zones_config }} - source: 'salt://bind/files/debian/named.conf.default-zones' - template: jinja @@ -117,8 +110,7 @@ bind_default_zones: - service: bind {{ map.log_dir }}: - file: - - directory + file.directory: - user: root - group: bind - mode: 775 @@ -126,8 +118,7 @@ bind_default_zones: /etc/logrotate.d/{{ map.service }}: - file: - - managed + file.managed: - source: salt://bind/files/debian/logrotate_bind - template: jinja - user: root @@ -142,8 +133,7 @@ bind_default_zones: {%- set file = salt['pillar.get']("available_zones:" + key + ":file") %} {% if args['type'] == "master" -%} zones-{{ file }}: - file: - - managed + file.managed: - name: {{ map.named_directory }}/{{ file }} - source: 'salt://bind/zones/{{ file }}' - user: {{ salt['pillar.get']('bind:config:user', map.user) }} diff --git a/bind/init.sls b/bind/init.sls index c24af2b..feb6609 100644 --- a/bind/init.sls +++ b/bind/init.sls @@ -1,11 +1,9 @@ {% from "bind/map.jinja" import map with context %} bind: - pkg: - - installed + pkg.installed: - pkgs: {{ map.pkgs|json }} - service: - - running + service.running: - name: {{ map.service }} - enable: True - reload: True