From 00e245e20ac9c9a53609eb15445c11bc6aca271b Mon Sep 17 00:00:00 2001 From: Andrew Vant Date: Mon, 6 Oct 2014 11:17:43 -0400 Subject: [PATCH] Added recursive management of minion.d and master.d. This allows users to easily add configuration settings that the formula doesn't yet provide, without having to modify the existing templates. --- salt/files/{master => master.d/_defaults.conf} | 0 salt/files/{minion => minion.d/_defaults.conf} | 0 salt/master.sls | 7 ++++--- salt/minion.sls | 7 ++++--- 4 files changed, 8 insertions(+), 6 deletions(-) rename salt/files/{master => master.d/_defaults.conf} (100%) rename salt/files/{minion => minion.d/_defaults.conf} (100%) diff --git a/salt/files/master b/salt/files/master.d/_defaults.conf similarity index 100% rename from salt/files/master rename to salt/files/master.d/_defaults.conf diff --git a/salt/files/minion b/salt/files/minion.d/_defaults.conf similarity index 100% rename from salt/files/minion rename to salt/files/minion.d/_defaults.conf diff --git a/salt/master.sls b/salt/master.sls index e9e8c3f..d977dd0 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -3,10 +3,11 @@ salt-master: pkg.installed: - name: {{ pkgs['salt-master'] }} - file.managed: - - name: /etc/salt/master.d/master.conf + file.recurse: + - name: /etc/salt/master.d - template: jinja - - source: salt://salt/files/master + - source: salt://salt/files/master.d + - clean: True service.running: - enable: True - watch: diff --git a/salt/minion.sls b/salt/minion.sls index d6f587f..d3eeb41 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -3,10 +3,11 @@ salt-minion: pkg.installed: - name: {{ pkgs['salt-minion'] }} - file.managed: - - name: /etc/salt/minion.d/minion.conf + file.recurse: + - name: /etc/salt/minion.d - template: jinja - - source: salt://salt/files/minion + - source: salt://salt/files/minion.d + - clean: True service.running: - enable: True - watch: