Merge pull request #71 from aboe76/improve_config
more improvements in _defaults.conf
This commit is contained in:
commit
b565c5f54c
@ -1,17 +1,17 @@
|
|||||||
# This file managed by Salt, do not edit by hand!!
|
# This file managed by Salt, do not edit by hand!!
|
||||||
# Based on salt version 0.17.4 default config
|
# Based on salt version 0.17.4 default config
|
||||||
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs'] %}
|
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs'] -%}
|
||||||
{% set salt = pillar.get('salt', {}) %}
|
{% set salt = pillar.get('salt', {}) -%}
|
||||||
{% set master = salt.get('master', {}) %}
|
{% set master = salt.get('master', {}) -%}
|
||||||
{% macro get_config(configname, default_value) %}
|
{%- macro get_config(configname, default_value) -%}
|
||||||
{% if configname in master %}
|
{%- if configname in master -%}
|
||||||
{{ configname }}: {{ master[configname] }}
|
{{ configname }}: {{ master[configname] }}
|
||||||
{% elif configname in salt and configname not in reserved_keys %}
|
{%- elif configname in salt and configname not in reserved_keys -%}
|
||||||
{{ configname }}: {{ salt[configname] }}
|
{{ configname }}: {{ salt[configname] }}
|
||||||
{% else %}
|
{%- else -%}
|
||||||
#{{ configname }}: {{ default_value }}
|
#{{ configname }}: {{ default_value }}
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
{% endmacro %}
|
{%- endmacro -%}
|
||||||
##### Primary configuration settings #####
|
##### Primary configuration settings #####
|
||||||
##########################################
|
##########################################
|
||||||
# This configuration file is used to manage the behavior of the Salt Master
|
# This configuration file is used to manage the behavior of the Salt Master
|
||||||
@ -344,27 +344,28 @@ client_acl_blacklist:
|
|||||||
# prod:
|
# prod:
|
||||||
# - /srv/salt/prod/services
|
# - /srv/salt/prod/services
|
||||||
# - /srv/salt/prod/states
|
# - /srv/salt/prod/states
|
||||||
{% if 'file_roots' in master %}
|
{% if 'file_roots' in master -%}
|
||||||
file_roots:
|
file_roots:
|
||||||
{% for name, roots in master['file_roots']|dictsort %}
|
{%- for name, roots in master['file_roots']|dictsort %}
|
||||||
{{ name }}:
|
{{ name }}:
|
||||||
{% for dir in roots %}
|
{%- for dir in roots %}
|
||||||
- {{ dir }}
|
- {{ dir }}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% elif 'file_roots' in salt %}
|
{% elif 'file_roots' in salt -%}
|
||||||
file_roots:
|
file_roots:
|
||||||
{% for name, roots in salt['file_roots']|dictsort %}
|
{%- for name, roots in salt['file_roots']|dictsort %}
|
||||||
{{ name }}:
|
{{ name }}:
|
||||||
{% for dir in roots %}
|
{%- for dir in roots %}
|
||||||
- {{ dir }}
|
- {{ dir }}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% else %}
|
{% else -%}
|
||||||
#file_roots:
|
#file_roots:
|
||||||
# base:
|
# base:
|
||||||
# - /srv/salt
|
# - /srv/salt
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
|
||||||
# The hash_type is the hash to use when discovering the hash of a file on
|
# The hash_type is the hash to use when discovering the hash of a file on
|
||||||
# the master server. The default is md5, but sha1, sha224, sha256, sha384
|
# the master server. The default is md5, but sha1, sha224, sha256, sha384
|
||||||
@ -433,12 +434,12 @@ file_ignore_glob:
|
|||||||
#fileserver_backend:
|
#fileserver_backend:
|
||||||
# - git
|
# - git
|
||||||
# - roots
|
# - roots
|
||||||
{% if 'fileserver_backend' in master %}
|
{% if 'fileserver_backend' in master -%}
|
||||||
fileserver_backend:
|
fileserver_backend:
|
||||||
{% for backend in master['fileserver_backend'] %}
|
{%- for backend in master['fileserver_backend'] %}
|
||||||
- {{ backend }}
|
- {{ backend }}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
#
|
#
|
||||||
# Uncomment the line below if you do not want the file_server to follow
|
# Uncomment the line below if you do not want the file_server to follow
|
||||||
# symlinks when walking the filesystem tree. This is set to True
|
# symlinks when walking the filesystem tree. This is set to True
|
||||||
@ -483,23 +484,23 @@ fileserver_backend:
|
|||||||
# environments.
|
# environments.
|
||||||
# Note: file:// repos will be treated as a remote, so refs you want used must
|
# Note: file:// repos will be treated as a remote, so refs you want used must
|
||||||
# exist in that repo as *local* refs.
|
# exist in that repo as *local* refs.
|
||||||
{% if 'gitfs_remotes' in master %}
|
{% if 'gitfs_remotes' in master -%}
|
||||||
gitfs_remotes:
|
gitfs_remotes:
|
||||||
{% for remote in master['gitfs_remotes'] %}
|
{%- for remote in master['gitfs_remotes'] %}
|
||||||
{% if remote is iterable and remote is not string %}
|
{%- if remote is iterable and remote is not string %}
|
||||||
{% for repo, children in remote.iteritems() %}
|
{%- for repo, children in remote.iteritems() %}
|
||||||
- {{ repo }}:
|
- {{ repo }}:
|
||||||
{% for child in children %}
|
{%- for child in children %}
|
||||||
{% for key, value in child.iteritems() %}
|
{%- for key, value in child.iteritems() %}
|
||||||
- {{ key }}: {{ value }}
|
- {{ key }}: {{ value }}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% else %}
|
{%- else %}
|
||||||
- {{ remote }}
|
- {{ remote }}
|
||||||
{% endif %}
|
{%- endif -%}
|
||||||
{% endfor %}
|
{%- endfor -%}
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
#
|
#
|
||||||
#gitfs_remotes:
|
#gitfs_remotes:
|
||||||
# - git://github.com/saltstack/salt-states.git
|
# - git://github.com/saltstack/salt-states.git
|
||||||
|
@ -466,7 +466,7 @@ gitfs_remotes:
|
|||||||
- {{ remote }}
|
- {{ remote }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- endif -%}
|
{%- endif %}
|
||||||
#
|
#
|
||||||
#gitfs_remotes:
|
#gitfs_remotes:
|
||||||
# - git://github.com/saltstack/salt-states.git
|
# - git://github.com/saltstack/salt-states.git
|
||||||
|
Loading…
Reference in New Issue
Block a user