Browse Source

Removing unnecessary -

I don't understand why unnecessary ``-`` were added after and before ``{%-`` and ``-%}``
tags/v0.57.0
Nitin Madhok 10 years ago
parent
commit
00a9e0640c
1 changed files with 116 additions and 116 deletions
  1. +116
    -116
      salt/files/master.d/_defaults.conf

+ 116
- 116
salt/files/master.d/_defaults.conf View File

# 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 salt = pillar.get('salt', {}) -%}
{% set master = salt.get('master', {}) -%}
{%- macro get_config(configname, default_value) -%}
{%- if configname in master -%}
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs'] %}
{% set salt = pillar.get('salt', {}) %}
{% set master = salt.get('master', {}) %}
{% macro get_config(configname, default_value) %}
{% 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 -%}
{%- endmacro -%}
{% endif %}
{% 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
# module. # module.
# This is completely disabled by default. # This is completely disabled by default.
# #
{% if 'client_acl_blacklist' in master -%}
{% if 'client_acl_blacklist' in master %}
client_acl_blacklist: client_acl_blacklist:
users: users:
{% for user in master['client_acl_blacklist'].get('users', []) -%}
{% for user in master['client_acl_blacklist'].get('users', []) %}
- {{ user }} - {{ user }}
{% endfor -%}
{% endfor %}
modules: modules:
{% for mod in master['client_acl_blacklist'].get('modules', []) -%}
{% for mod in master['client_acl_blacklist'].get('modules', []) %}
- {{ mod }} - {{ mod }}
{% endfor -%}
{% elif 'client_acl_blacklist' in salt -%}
{% endfor %}
{% elif 'client_acl_blacklist' in salt %}
client_acl_blacklist: client_acl_blacklist:
users: users:
{% for user in salt['client_acl_blacklist'].get('users', []) -%}
{% for user in salt['client_acl_blacklist'].get('users', []) %}
- {{ user }} - {{ user }}
{% endfor -%}
{% endfor %}
modules: modules:
{% for mod in salt['client_acl_blacklist'].get('modules', []) -%}
{% for mod in salt['client_acl_blacklist'].get('modules', []) %}
- {{ mod }} - {{ mod }}
{% endfor -%}
{% else -%}
{% endfor %}
{% else %}
#client_acl_blacklist: #client_acl_blacklist:
# users: # users:
# - root # - root
# - '^(?!sudo_).*$' # all non sudo users # - '^(?!sudo_).*$' # all non sudo users
# modules: # modules:
# - cmd # - cmd
{%- endif %}
{% endif %}


# The external auth system uses the Salt auth modules to authenticate and # The external auth system uses the Salt auth modules to authenticate and
# validate users to access areas of the Salt system. # validate users to access areas of the Salt system.
# 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 -%}
{% elif 'file_roots' in salt -%}
{% endfor %}
{% endfor %}
{% 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 -%}
{% else -%}
{% endfor %}
{% endfor %}
{% 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
# For example, if you manage your custom modules and states in subversion # For example, if you manage your custom modules and states in subversion
# and don't want all the '.svn' folders and content synced to your minions, # and don't want all the '.svn' folders and content synced to your minions,
# you could set this to '/\.svn($|/)'. By default nothing is ignored. # you could set this to '/\.svn($|/)'. By default nothing is ignored.
{% if 'file_ignore_regex' in master -%}
{% if 'file_ignore_regex' in master %}
file_ignore_regex: file_ignore_regex:
{% for regex in master['file_ignore_regex'] -%}
{% for regex in master['file_ignore_regex'] %}
- {{ regex }} - {{ regex }}
{% endfor -%}
{% elif 'file_ignore_regex' in salt -%}
{% endfor %}
{% elif 'file_ignore_regex' in salt %}
file_ignore_regex: file_ignore_regex:
{% for regex in salt['file_ignore_regex'] -%}
{% for regex in salt['file_ignore_regex'] %}
- {{ regex }} - {{ regex }}
{% endfor -%}
{% else -%}
{% endfor %}
{% else %}
#file_ignore_regex: #file_ignore_regex:
# - '/\.svn($|/)' # - '/\.svn($|/)'
# - '/\.git($|/)' # - '/\.git($|/)'
{%- endif %}
{% endif %}


# A file glob (or list of file globs) that will be matched against the file # A file glob (or list of file globs) that will be matched against the file
# path before syncing the modules and states to the minions. This is similar # path before syncing the modules and states to the minions. This is similar
# to file_ignore_regex above, but works on globs instead of regex. By default # to file_ignore_regex above, but works on globs instead of regex. By default
# nothing is ignored. # nothing is ignored.
{% if 'file_ignore_glob' in master -%}
{% if 'file_ignore_glob' in master %}
file_ignore_glob: file_ignore_glob:
{% for glob in master['file_ignore_glob'] -%}
{% for glob in master['file_ignore_glob'] %}
- {{ glob }} - {{ glob }}
{% endfor -%}
{% elif 'file_ignore_glob' in salt -%}
{% endfor %}
{% elif 'file_ignore_glob' in salt %}
file_ignore_glob: file_ignore_glob:
{% for glob in salt['file_ignore_glob'] -%}
{% for glob in salt['file_ignore_glob'] %}
- {{ glob }} - {{ glob }}
{% endfor -%}
{% else -%}
{% endfor %}
{% else %}
# file_ignore_glob: # file_ignore_glob:
# - '*.pyc' # - '*.pyc'
# - '*/somefolder/*.bak' # - '*/somefolder/*.bak'
# - '*.swp' # - '*.swp'
{%- endif %}
{% endif %}


# File Server Backend # File Server Backend
# Salt supports a modular fileserver backend system, this system allows # Salt supports a modular fileserver backend system, this system allows
#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
# 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 key, value in child.iteritems() -%}
{% for child in children %}
{% for key, value in child.iteritems() %}
- {{ key }}: {{ value }} - {{ key }}: {{ value }}
{%- endfor %}
{%- endfor %}
{%- endfor %}
{%- else -%}
{% endfor %}
{% endfor %}
{% endfor %}
{% else %}
- {{ remote }} - {{ remote }}
{%- endif %}
{%- endfor %}
{%- endif %}
{% endif %}
{% endfor %}
{% endif %}
# #
#gitfs_remotes: #gitfs_remotes:
# - git://github.com/saltstack/salt-states.git # - git://github.com/saltstack/salt-states.git
# Pillar is laid out in the same fashion as the file server, with environments, # Pillar is laid out in the same fashion as the file server, with environments,
# a top file and sls files. However, pillar data does not need to be in the # a top file and sls files. However, pillar data does not need to be in the
# highstate format, and is generally just key/value pairs. # highstate format, and is generally just key/value pairs.
{% if 'pillar_roots' in master -%}
{% if 'pillar_roots' in master %}
pillar_roots: pillar_roots:
{%- for name, roots in master['pillar_roots']|dictsort %}
{% for name, roots in master['pillar_roots']|dictsort %}
{{ name }}: {{ name }}:
{%- for dir in roots %}
{% for dir in roots %}
- {{ dir }} - {{ dir }}
{%- endfor -%}
{%- endfor -%}
{% elif 'pillar_roots' in salt -%}
{% endfor %}
{% endfor %}
{% elif 'pillar_roots' in salt %}
pillar_roots: pillar_roots:
{%- for name, roots in salt['pillar_roots']|dictsort %}
{% for name, roots in salt['pillar_roots']|dictsort %}
{{ name }}: {{ name }}:
{%- for dir in roots %}
{% for dir in roots %}
- {{ dir }} - {{ dir }}
{%- endfor -%}
{%- endfor -%}
{% endfor %}
{% endfor %}
{% else %} {% else %}
#pillar_roots: #pillar_roots:
# base: # base:
# - /srv/pillar # - /srv/pillar
{%- endif %}
{% endif %}


{% if 'ext_pillar' in master -%}
{% if 'ext_pillar' in master %}
ext_pillar: ext_pillar:
{% for pillar in master['ext_pillar'] %} {% for pillar in master['ext_pillar'] %}
- {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }} - {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }}
{% endfor -%}
{% elif 'ext_pillar' in salt -%}
{% endfor %}
{% elif 'ext_pillar' in salt %}
ext_pillar: ext_pillar:
{% for pillar in salt['ext_pillar'] %} {% for pillar in salt['ext_pillar'] %}
- {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }} - {{ pillar.items()[0][0] }}: {{ pillar.items()[0][1] }}
{% endfor -%}
{% endfor %}
{% else %} {% else %}
#ext_pillar: #ext_pillar:
# - hiera: /etc/hiera.yaml # - hiera: /etc/hiera.yaml
# - cmd_yaml: cat /etc/salt/yaml # - cmd_yaml: cat /etc/salt/yaml
{%- endif %}
{% endif %}


# The pillar_gitfs_ssl_verify option specifies whether to ignore ssl certificate # The pillar_gitfs_ssl_verify option specifies whether to ignore ssl certificate
# errors when contacting the pillar gitfs backend. You might want to set this to # errors when contacting the pillar gitfs backend. You might want to set this to
# #
# This is not recommended, since it would allow anyone who gets root on any # This is not recommended, since it would allow anyone who gets root on any
# single minion to instantly have root on all of the minions! # single minion to instantly have root on all of the minions!
{% if 'peer' in master -%}
{% if 'peer' in master %}
peer: peer:
{% for name, roots in master['peer'].items() -%}
{% for name, roots in master['peer'].items() %}
{{ name }}: {{ name }}:
{% for mod in roots -%}
{% for mod in roots %}
- {{ mod }} - {{ mod }}
{% endfor -%}
{% endfor -%}
{% elif 'peer' in salt -%}
{% endfor %}
{% endfor %}
{% elif 'peer' in salt %}
peer: peer:
{% for name, roots in salt['peer'].items() -%}
{% for name, roots in salt['peer'].items() %}
{{ name }}: {{ name }}:
{% for mod in roots -%}
{% for mod in roots %}
- {{ mod }} - {{ mod }}
{% endfor -%}
{% endfor -%}
{% endif -%}
{% endfor %}
{% endfor %}
{% endif %}


# Minions can also be allowed to execute runners from the salt master. # Minions can also be allowed to execute runners from the salt master.
# Since executing a runner from the minion could be considered a security risk, # Since executing a runner from the minion could be considered a security risk,
#peer_run: #peer_run:
# foo.example.com: # foo.example.com:
# - manage.up # - manage.up
{% if 'peer_run' in master -%}
{% if 'peer_run' in master %}
peer_run: peer_run:
{% for name, roots in master['peer_run'].items() -%}
{% for name, roots in master['peer_run'].items() %}
{{ name }}: {{ name }}:
{% for mod in roots -%}
{% for mod in roots %}
- {{ mod }} - {{ mod }}
{% endfor -%}
{% endfor -%}
{% elif 'peer_run' in salt -%}
{% endfor %}
{% endfor %}
{% elif 'peer_run' in salt %}
peer_run: peer_run:
{% for name, roots in salt['peer_run'].items() -%}
{% for name, roots in salt['peer_run'].items() %}
{{ name }}: {{ name }}:
{% for mod in roots -%}
{% for mod in roots %}
- {{ mod }} - {{ mod }}
{% endfor -%}
{% endfor -%}
{% endif -%}
{% endfor %}
{% endfor %}
{% endif %}


##### Mine settings ##### ##### Mine settings #####
########################################## ##########################################
log_granular_levels: log_granular_levels:
{% for name, lvl in master['log_granular_levels'] %} {% for name, lvl in master['log_granular_levels'] %}
{{ name }}: {{ lvl }} {{ name }}: {{ lvl }}
{% endfor -%}
{% endfor %}
{% elif 'log_granular_levels' in salt %} {% elif 'log_granular_levels' in salt %}
log_granular_levels: log_granular_levels:
{% for name, lvl in salt['log_granular_levels'] %} {% for name, lvl in salt['log_granular_levels'] %}
{{ name }}: {{ lvl }} {{ name }}: {{ lvl }}
{% endfor -%}
{% endfor %}
{% else %} {% else %}
#log_granular_levels: {} #log_granular_levels: {}
{% endif %} {% endif %}
nodegroups: nodegroups:
{% for name, lvl in master['nodegroups'] %} {% for name, lvl in master['nodegroups'] %}
{{ name }}: {{ lvl }} {{ name }}: {{ lvl }}
{% endfor -%}
{% endfor %}
{% elif 'nodegroups' in salt %} {% elif 'nodegroups' in salt %}
nodegroups: nodegroups:
{% for name, lvl in salt['nodegroups'] %} {% for name, lvl in salt['nodegroups'] %}
{{ name }}: {{ lvl }} {{ name }}: {{ lvl }}
{% endfor -%}
{% endfor %}
{% endif %} {% endif %}




win_gitrepos: win_gitrepos:
{% for repo in master['win_gitrepos'] %} {% for repo in master['win_gitrepos'] %}
- {{ repo }} - {{ repo }}
{% endfor -%}
{% endfor %}
{% elif 'win_gitrepos' in salt %} {% elif 'win_gitrepos' in salt %}
win_gitrepos: win_gitrepos:
{% for repo in salt['win_gitrepos'] %} {% for repo in salt['win_gitrepos'] %}
- {{ repo }} - {{ repo }}
{% endfor -%}
{% endfor %}
{% else %} {% else %}
#win_gitrepos: #win_gitrepos:
# - 'https://github.com/saltstack/salt-winrepo.git' # - 'https://github.com/saltstack/salt-winrepo.git'
{% endif %} {% endif %}


{% if 'halite' in master -%}
{% if 'halite' in master %}
##### Halite ##### ##### Halite #####
########################################## ##########################################
halite: halite:
{%- for name, value in master['halite'].iteritems() %}
{% for name, value in master['halite'].iteritems() %}
{{ name }}: {{ value }} {{ name }}: {{ value }}
{%- endfor %}
{%- endif %}
{% endfor %}
{% endif %}


{% if 'rest_cherrypy' in master -%}
{% if 'rest_cherrypy' in master %}
##### rest_cherrypy ##### ##### rest_cherrypy #####
########################################## ##########################################
rest_cherrypy: rest_cherrypy:
{%- for name, value in master['rest_cherrypy'].iteritems() %}
{% for name, value in master['rest_cherrypy'].iteritems() %}
{{ name }}: {{ value }} {{ name }}: {{ value }}
{%- endfor %}
{%- endif %}
{% endfor %}
{% endif %}

Loading…
Cancel
Save