feat(tofs): allow TOFS for master configuration

This commit is contained in:
Imran Iqbal
2019-06-07 03:58:24 +01:00
parent 61a93d8c1e
commit 1b202afb29
7 changed files with 32 additions and 2 deletions
+4 -1
View File
@@ -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
+1
View File
@@ -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
+4
View File
@@ -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.
########################################################################
+4
View File
@@ -0,0 +1,4 @@
########################################################################
## File managed by Salt.
## Your changes will be overwritten.
########################################################################
+11 -1
View File
@@ -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: