Browse Source

Merge pull request #259 from kakwa/separate_engines_config

make the configuration of engines specific to master or minion
tags/v0.57.0
Forrest 8 years ago
parent
commit
01043740dc
4 changed files with 5 additions and 3 deletions
  1. +1
    -0
      salt/files/master.d/engine.conf
  2. +1
    -1
      salt/files/master.d/f_defaults.conf
  3. +1
    -0
      salt/files/minion.d/engine.conf
  4. +2
    -2
      salt/files/minion.d/f_defaults.conf

+ 1
- 0
salt/files/master.d/engine.conf View File

# This file is managed by Salt! Do not edit by hand! # This file is managed by Salt! Do not edit by hand!
# #
{%- set engines = salt['pillar.get']('salt:engines') -%} {%- set engines = salt['pillar.get']('salt:engines') -%}
{%- set engines = salt['pillar.get']('salt:master:engines', default=engines, merge=True) -%}
{%- if engines %} {%- if engines %}
engines: engines:
{{ engines | yaml(False) | indent(2) }} {{ engines | yaml(False) | indent(2) }}

+ 1
- 1
salt/files/master.d/f_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 2015.8.7 default config # Based on salt version 2015.8.7 default config
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs'] -%}
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs', 'engines'] -%}
{% set cfg_salt = pillar.get('salt', {}) -%} {% set cfg_salt = pillar.get('salt', {}) -%}
{% set cfg_master = cfg_salt.get('master', {}) -%} {% set cfg_master = cfg_salt.get('master', {}) -%}
{%- macro get_config(configname, default_value) -%} {%- macro get_config(configname, default_value) -%}

+ 1
- 0
salt/files/minion.d/engine.conf View File

# This file is managed by Salt! Do not edit by hand! # This file is managed by Salt! Do not edit by hand!
# #
{%- set engines = salt['pillar.get']('salt:engines') -%} {%- set engines = salt['pillar.get']('salt:engines') -%}
{%- set engines = salt['pillar.get']('salt:minion:engines', default=engines, merge=True) -%}
{%- if engines %} {%- if engines %}
engines: engines:
{{ engines | yaml(False) | indent(2) }} {{ engines | yaml(False) | indent(2) }}

+ 2
- 2
salt/files/minion.d/f_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 2015.8.7 default config # Based on salt version 2015.8.7 default config
# #
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs'] -%}
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs', 'engines'] -%}
{% set cfg_salt = pillar.get('salt', {}) -%} {% set cfg_salt = pillar.get('salt', {}) -%}
{% set cfg_minion = cfg_salt.get('minion', {}) -%} {% set cfg_minion = cfg_salt.get('minion', {}) -%}
{% set default_keys = [] -%} {% set default_keys = [] -%}
{%- if configname not in reserved_keys and configname not in default_keys %} {%- if configname not in reserved_keys and configname not in default_keys %}
{{ configname }}: {{ cfg_minion[configname]|json }} {{ configname }}: {{ cfg_minion[configname]|json }}
{%- endif %} {%- endif %}
{%- endfor %}
{%- endfor %}

Loading…
Cancel
Save