feat(tofs
): allow TOFS for master configuration
This commit is contained in:
parent
61a93d8c1e
commit
1b202afb29
@ -64,9 +64,12 @@ salt:
|
|||||||
# 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
|
||||||
|
@ -10,6 +10,7 @@ salt:
|
|||||||
|
|
||||||
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
salt/files/default/master.d/engine.conf
Normal file
4
salt/files/default/master.d/engine.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
########################################################################
|
||||||
|
## File managed by Salt.
|
||||||
|
## Your changes will be overwritten.
|
||||||
|
########################################################################
|
4
salt/files/default/master.d/f_defaults.conf
Normal file
4
salt/files/default/master.d/f_defaults.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
########################################################################
|
||||||
|
## File managed by Salt.
|
||||||
|
## Your changes will be overwritten.
|
||||||
|
########################################################################
|
4
salt/files/default/master.d/lxc_profiles.conf
Normal file
4
salt/files/default/master.d/lxc_profiles.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
########################################################################
|
||||||
|
## File managed by Salt.
|
||||||
|
## Your changes will be overwritten.
|
||||||
|
########################################################################
|
4
salt/files/default/master.d/reactor.conf
Normal file
4
salt/files/default/master.d/reactor.conf
Normal file
@ -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:
|
salt-master:
|
||||||
{% if salt_settings.install_packages %}
|
{% if salt_settings.install_packages %}
|
||||||
@ -14,8 +16,16 @@ salt-master:
|
|||||||
{% 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…
Reference in New Issue
Block a user