Fix the handling of event_return_whitelist/event_return_blacklist
If those options are set in pillar data, the jinja template salt/files/master.d/_defaults.conf would fail to compile trying to evaluate non-existing variables. Replace those variables with the corresponding dictionnary entries.
This commit is contained in:
parent
d4ae38f825
commit
7fb86b9076
|
@ -150,12 +150,12 @@
|
||||||
# Only events returns matching tags in a whitelist
|
# Only events returns matching tags in a whitelist
|
||||||
{% if 'event_return_whitelist' in cfg_master -%}
|
{% if 'event_return_whitelist' in cfg_master -%}
|
||||||
event_return_whitelist:
|
event_return_whitelist:
|
||||||
{%- for event_return in event_return_whitelist %}
|
{%- for event_return in cfg_master['event_return_whitelist'] %}
|
||||||
- {{ event_return }}
|
- {{ event_return }}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% elif 'event_return_whitelist' in cfg_salt -%}
|
{% elif 'event_return_whitelist' in cfg_salt -%}
|
||||||
event_return_whitelist:
|
event_return_whitelist:
|
||||||
{%- for event_return in event_return_whitelist %}
|
{%- for event_return in cfg_salt['event_return_whitelist'] %}
|
||||||
- {{ event_return }}
|
- {{ event_return }}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
|
@ -167,12 +167,12 @@ event_return_whitelist:
|
||||||
# Store all event returns _except_ the tags in a blacklist
|
# Store all event returns _except_ the tags in a blacklist
|
||||||
{% if 'event_return_blacklist' in cfg_master -%}
|
{% if 'event_return_blacklist' in cfg_master -%}
|
||||||
event_return_blacklist:
|
event_return_blacklist:
|
||||||
{%- for event_return in event_return_blacklist %}
|
{%- for event_return in cfg_master['event_return_blacklist'] %}
|
||||||
- {{ event_return }}
|
- {{ event_return }}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% elif 'event_return_blacklist' in cfg_salt -%}
|
{% elif 'event_return_blacklist' in cfg_salt -%}
|
||||||
event_return_blacklist:
|
event_return_blacklist:
|
||||||
{%- for event_return in event_return_blacklist %}
|
{%- for event_return in cfg_salt['event_return_blacklist'] %}
|
||||||
- {{ event_return }}
|
- {{ event_return }}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% else -%}
|
{% else -%}
|
||||||
|
|
Loading…
Reference in New Issue