Browse Source

Add optional method to remove /etc/salt/master.

Signed-off-by: Rene Jochum <rene@jochums.at>
tags/v0.57.0
Rene Jochum 8 years ago
parent
commit
f17b8f5424
3 changed files with 10 additions and 0 deletions
  1. +3
    -0
      pillar.example
  2. +1
    -0
      salt/defaults.yaml
  3. +6
    -0
      salt/master.sls

+ 3
- 0
pillar.example View File

# This state will remove "/etc/salt/minion" when you set this to true. # This state will remove "/etc/salt/minion" when you set this to true.
minion_remove_config: True minion_remove_config: True


# This state will remove "/etc/salt/master" when you set this to true.
master_remove_config: True

# Set this to False to not have the formula install packages (in the case you # Set this to False to not have the formula install packages (in the case you
# install Salt via git/pip/etc.) # install Salt via git/pip/etc.)
install_packages: True install_packages: True

+ 1
- 0
salt/defaults.yaml View File

config_path: /etc/salt config_path: /etc/salt


minion_remove_config: False minion_remove_config: False
master_remove_config: False


minion_service: salt-minion minion_service: salt-minion
master_service: salt-master master_service: salt-master

+ 6
- 0
salt/master.sls View File

- file: salt-master - file: salt-master
- file: remove-old-master-conf-file - file: remove-old-master-conf-file


{% if salt_settings.master_remove_config %}
remove-default-master-conf-file:
file.absent:
- name: {{ salt_settings.config_path }}/master
{% endif %}

# clean up old _defaults.conf file if they have it around # clean up old _defaults.conf file if they have it around
remove-old-master-conf-file: remove-old-master-conf-file:
file.absent: file.absent:

Loading…
Cancel
Save