Przeglądaj źródła

Merge pull request #49 from johtso/issue-48

Avoid config key clashes
master
Forrest 10 lat temu
rodzic
commit
4702e77756
2 zmienionych plików z 4 dodań i 2 usunięć
  1. +2
    -1
      salt/files/master
  2. +2
    -1
      salt/files/minion

+ 2
- 1
salt/files/master Wyświetl plik

@@ -1,11 +1,12 @@
# This file managed by Salt, do not edit by hand!!
# 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 -%}
{{ configname }}: {{ master[configname] }}
{%- elif configname in salt -%}
{%- elif configname in salt and configname not in reserved_keys -%}
{{ configname }}: {{ salt[configname] }}
{%- else -%}
#{{ configname }}: {{ default_value }}

+ 2
- 1
salt/files/minion Wyświetl plik

@@ -1,11 +1,12 @@
# This file managed by Salt, do not edit by hand!!
# Based on salt version 0.17.4 default config
{% set reserved_keys = ['master', 'minion', 'cloud', 'salt_cloud_certs'] -%}
{% set salt = pillar.get('salt', {}) -%}
{% set minion = salt.get('minion', {}) -%}
{%- macro get_config(configname, default_value) -%}
{%- if configname in minion -%}
{{ configname }}: {{ minion[configname] }}
{%- elif configname in salt -%}
{%- elif configname in salt and configname not in reserved_keys -%}
{{ configname }}: {{ salt[configname] }}
{%- else -%}
#{{ configname }}: {{ default_value }}

Ładowanie…
Anuluj
Zapisz