From 8ebb7f57df32f041a6e3362fa5f78a757026d8f3 Mon Sep 17 00:00:00 2001 From: Brian Jackson Date: Mon, 23 Mar 2015 16:53:24 -0500 Subject: [PATCH] Stop using clean: True on /etc/salt/{minion,master}.d New versions of Salt put config files in /etc/salt/{minion,master}.d. We don't want to erase them by using a clean: True on the file.recurse. This is a backward incompatible change, but it's necessary to avoid deleting Salt config files. Resolves #104 --- pillar.example | 7 ++++--- salt/defaults.yaml | 1 + salt/master.sls | 2 +- salt/minion.sls | 2 +- salt/standalone.sls | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pillar.example b/pillar.example index aadce72..2b2fd10 100644 --- a/pillar.example +++ b/pillar.example @@ -1,4 +1,5 @@ salt: + clean_config_d_dir: False # to overwrite map.jinja salt packages lookup: @@ -27,18 +28,18 @@ salt: ssl_key: /etc/pki/api/certs/server.key debug: False disable_ssl: False - + # salt minion config: minion: # single master setup master: salt - + # multi master setup master: - salt_master_1 - salt_master_2 - + fileserver_backend: - git - roots diff --git a/salt/defaults.yaml b/salt/defaults.yaml index 5b9b92f..38f623a 100644 --- a/salt/defaults.yaml +++ b/salt/defaults.yaml @@ -10,3 +10,4 @@ salt: salt_cloud: salt-cloud salt_api: salt-api salt_ssh: salt-ssh + clean_config_d_dir: False diff --git a/salt/master.sls b/salt/master.sls index 49b6ef0..b510753 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -7,7 +7,7 @@ salt-master: - name: {{ salt_settings.config_path }}/master.d - template: jinja - source: salt://salt/files/master.d - - clean: True + - clean: {{ salt_settings.clean_config_d_dir }} service.running: - enable: True - name: {{ salt_settings.master_service }} diff --git a/salt/minion.sls b/salt/minion.sls index bf0860a..e78ff31 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -7,7 +7,7 @@ salt-minion: - name: {{ salt_settings.config_path }}/minion.d - template: jinja - source: salt://salt/files/minion.d - - clean: True + - clean: {{ salt_settings.clean_config_d_dir }} - context: standalone: False service.running: diff --git a/salt/standalone.sls b/salt/standalone.sls index d7bf2d8..cec9392 100644 --- a/salt/standalone.sls +++ b/salt/standalone.sls @@ -7,7 +7,7 @@ salt-minion: - name: {{ salt_settings.config_path }}/minion.d - template: jinja - source: salt://salt/files/minion.d - - clean: True + - clean: {{ salt_settings.clean_config_d_dir }} - context: standalone: True service.dead: