2
0

User publisher_acl setting in salt master config even if used client_acl in

pillar (backwards compatibility)
This commit is contained in:
Vitali Quiering 2017-03-27 08:39:05 +02:00
parent d3b46a3648
commit f7189e2900

View File

@ -351,7 +351,7 @@ publisher_acl:
{%- endfor -%} {%- endfor -%}
{% elif 'client_acl' in cfg_master -%} {% elif 'client_acl' in cfg_master -%}
{%- do default_keys.append('client_acl') %} {%- do default_keys.append('client_acl') %}
client_acl: publisher_acl:
{%- for name, user in cfg_master['client_acl']|dictsort %} {%- for name, user in cfg_master['client_acl']|dictsort %}
{{ name}}: {{ name}}:
{%- for command in user %} {%- for command in user %}
@ -359,7 +359,7 @@ client_acl:
{%- endfor -%} {%- endfor -%}
{%- endfor -%} {%- endfor -%}
{% elif 'client_acl' in cfg_salt -%} {% elif 'client_acl' in cfg_salt -%}
client_acl: publisher_acl:
{%- for name, user in cfg_salt['client_acl']|dictsort %} {%- for name, user in cfg_salt['client_acl']|dictsort %}
{{ name }}: {{ name }}:
{%- for command in user %} {%- for command in user %}
@ -401,7 +401,7 @@ publisher_acl_blacklist:
{% endfor %} {% endfor %}
{% elif 'client_acl_blacklist' in cfg_master %} {% elif 'client_acl_blacklist' in cfg_master %}
{%- do default_keys.append('client_acl_blacklist') %} {%- do default_keys.append('client_acl_blacklist') %}
client_acl_blacklist: publisher_acl_blacklist:
users: users:
{% for user in cfg_master['client_acl_blacklist'].get('users', []) %} {% for user in cfg_master['client_acl_blacklist'].get('users', []) %}
- {{ user }} - {{ user }}
@ -411,7 +411,7 @@ client_acl_blacklist:
- {{ mod }} - {{ mod }}
{% endfor %} {% endfor %}
{% elif 'client_acl_blacklist' in cfg_salt %} {% elif 'client_acl_blacklist' in cfg_salt %}
client_acl_blacklist: publisher_acl_blacklist:
users: users:
{% for user in cfg_salt['client_acl_blacklist'].get('users', []) %} {% for user in cfg_salt['client_acl_blacklist'].get('users', []) %}
- {{ user }} - {{ user }}
@ -421,7 +421,7 @@ client_acl_blacklist:
- {{ mod }} - {{ mod }}
{% endfor %} {% endfor %}
{% else %} {% else %}
#client_acl_blacklist: #publisher_acl_blacklist:
# users: # users:
# - root # - root
# - '^(?!sudo_).*$' # all non sudo users # - '^(?!sudo_).*$' # all non sudo users
@ -429,7 +429,7 @@ client_acl_blacklist:
# - cmd # - cmd
{% endif %} {% endif %}
# Enforce client_acl & client_acl_blacklist when users have sudo # Enforce publisher_acl & publisher_acl_blacklist when users have sudo
# access to the salt command. # access to the salt command.
{{ get_config('sudo_acl', 'False') }} {{ get_config('sudo_acl', 'False') }}