Skip to content

Commit

Permalink
Stop using clean: True on /etc/salt/{minion,master}.d
Browse files Browse the repository at this point in the history
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 saltstack-formulas#104
  • Loading branch information
Brian Jackson committed Mar 23, 2015
1 parent 2118cc0 commit a01de1b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pillar.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
salt:
clean_d_dir: False

# to overwrite map.jinja salt packages
lookup:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions salt/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ salt:
salt_cloud: salt-cloud
salt_api: salt-api
salt_ssh: salt-ssh
clean_d_dir: False
2 changes: 2 additions & 0 deletions salt/master.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ salt-master:
- name: {{ salt_settings.config_path }}/master.d
- template: jinja
- source: salt://salt/files/master.d
{% if salt_settings.clean_d_dir %}
- clean: True
{% endif %}
service.running:
- enable: True
- name: {{ salt_settings.master_service }}
Expand Down
2 changes: 2 additions & 0 deletions salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ salt-minion:
- name: {{ salt_settings.config_path }}/minion.d
- template: jinja
- source: salt://salt/files/minion.d
{% if salt_settings.clean_d_dir %}
- clean: True
{% endif %}
- context:
standalone: False
service.running:
Expand Down
2 changes: 2 additions & 0 deletions salt/standalone.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ salt-minion:
- name: {{ salt_settings.config_path }}/minion.d
- template: jinja
- source: salt://salt/files/minion.d
{% if salt_settings.clean_d_dir %}
- clean: True
{% endif %}
- context:
standalone: True
service.dead:
Expand Down

0 comments on commit a01de1b

Please sign in to comment.