Browse Source

feat(`tofs`): allow TOFS for master configuration

tags/v0.58.0
Imran Iqbal 5 years ago
parent
commit
1b202afb29
No account linked to committer's email address
7 changed files with 32 additions and 2 deletions
  1. +4
    -1
      pillar.example
  2. +1
    -0
      salt/defaults.yaml
  3. +4
    -0
      salt/files/default/master.d/engine.conf
  4. +4
    -0
      salt/files/default/master.d/f_defaults.conf
  5. +4
    -0
      salt/files/default/master.d/lxc_profiles.conf
  6. +4
    -0
      salt/files/default/master.d/reactor.conf
  7. +11
    -1
      salt/master.sls

+ 4
- 1
pillar.example View File

# dirs: # dirs:
# files: files_alt # files: files_alt
# default: default_alt # default: default_alt
# source_files: {}
# source_files:
# salt-master:
# - 'alt_master.d'


# salt master config # salt master config
master_config_use_TOFS: True
master: master:
fileserver_backend: fileserver_backend:
- git - git

+ 1
- 0
salt/defaults.yaml View File



minion_remove_config: False minion_remove_config: False
master_remove_config: False master_remove_config: False
master_config_use_TOFS: False


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

+ 4
- 0
salt/files/default/master.d/engine.conf View File

########################################################################
## File managed by Salt.
## Your changes will be overwritten.
########################################################################

+ 4
- 0
salt/files/default/master.d/f_defaults.conf View File

########################################################################
## File managed by Salt.
## Your changes will be overwritten.
########################################################################

+ 4
- 0
salt/files/default/master.d/lxc_profiles.conf View File

########################################################################
## File managed by Salt.
## Your changes will be overwritten.
########################################################################

+ 4
- 0
salt/files/default/master.d/reactor.conf View File

########################################################################
## File managed by Salt.
## Your changes will be overwritten.
########################################################################

+ 11
- 1
salt/master.sls View File

{% from "salt/map.jinja" import salt_settings with context %}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot ~ "/map.jinja" import salt_settings with context %}
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}


salt-master: salt-master:
{% if salt_settings.install_packages %} {% if salt_settings.install_packages %}
{% endif %} {% endif %}
file.recurse: file.recurse:
- name: {{ salt_settings.config_path }}/master.d - name: {{ salt_settings.config_path }}/master.d
{%- if salt_settings.master_config_use_TOFS %}
- template: ''
- source: {{ files_switch(['master.d'],
lookup='salt-master'
)
}}
{%- else %}
- template: jinja - template: jinja
- source: salt://{{ slspath }}/files/master.d - source: salt://{{ slspath }}/files/master.d
{%- endif %}
- clean: {{ salt_settings.clean_config_d_dir }} - clean: {{ salt_settings.clean_config_d_dir }}
- exclude_pat: _* - exclude_pat: _*
service.running: service.running:

Loading…
Cancel
Save