feat(`tofs`): allow TOFS for master configuration
This commit is contained in:
parent
61a93d8c1e
commit
1b202afb29
|
@ -64,9 +64,12 @@ salt:
|
|||
# dirs:
|
||||
# files: files_alt
|
||||
# default: default_alt
|
||||
# source_files: {}
|
||||
# source_files:
|
||||
# salt-master:
|
||||
# - 'alt_master.d'
|
||||
|
||||
# salt master config
|
||||
master_config_use_TOFS: True
|
||||
master:
|
||||
fileserver_backend:
|
||||
- git
|
||||
|
|
|
@ -10,6 +10,7 @@ salt:
|
|||
|
||||
minion_remove_config: False
|
||||
master_remove_config: False
|
||||
master_config_use_TOFS: False
|
||||
|
||||
minion_service: salt-minion
|
||||
master_service: salt-master
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
########################################################################
|
||||
## File managed by Salt.
|
||||
## Your changes will be overwritten.
|
||||
########################################################################
|
|
@ -0,0 +1,4 @@
|
|||
########################################################################
|
||||
## File managed by Salt.
|
||||
## Your changes will be overwritten.
|
||||
########################################################################
|
|
@ -0,0 +1,4 @@
|
|||
########################################################################
|
||||
## File managed by Salt.
|
||||
## Your changes will be overwritten.
|
||||
########################################################################
|
|
@ -0,0 +1,4 @@
|
|||
########################################################################
|
||||
## File managed by Salt.
|
||||
## Your changes will be overwritten.
|
||||
########################################################################
|
|
@ -1,4 +1,6 @@
|
|||
{% 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:
|
||||
{% if salt_settings.install_packages %}
|
||||
|
@ -14,8 +16,16 @@ salt-master:
|
|||
{% endif %}
|
||||
file.recurse:
|
||||
- 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
|
||||
- source: salt://{{ slspath }}/files/master.d
|
||||
{%- endif %}
|
||||
- clean: {{ salt_settings.clean_config_d_dir }}
|
||||
- exclude_pat: _*
|
||||
service.running:
|
||||
|
|
Loading…
Reference in New Issue