specify group specific value or default
This commit is contained in:
parent
c0740ccbff
commit
9fe077af8c
2 changed files with 7 additions and 6 deletions
|
@ -95,11 +95,11 @@ Runas_Alias {{ name }} = {{ ",".join(runas) }}
|
|||
%{{ group }} {{ spec }}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
||||
{%- for unix_group in ad_groups.keys() %}
|
||||
{%- for unix_group in ad_groups %}
|
||||
{%- if unix_group in ad_group_maps.keys() %}
|
||||
%{{ unix_group }} {{ ad_group_maps.unix_group }}
|
||||
%{{ unix_group }} {{ ad_group_maps[unix_group] }}
|
||||
{%- else %}
|
||||
%{{ unix_group }} {{ ad_group_maps.default }}
|
||||
%{{ unix_group }} {{ ad_group_maps['default'] }}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
|
||||
{% set ad_group_maps = salt['grains.filter_by']({
|
||||
'default': { 'default': 'ALL = (ALL:ALL) NOPASSWD: SUPPORT' },
|
||||
'dev': { 'default': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
||||
'qa': { 'default': 'ALL = (ALL:ALL) NOPASSWD: SUPPORT',
|
||||
'plosqa': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
||||
'vagrant': { 'default': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
||||
'dev': { 'default': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
||||
'qa': { 'default': 'ALL = (ALL:ALL) NOPASSWD: SUPPORT',
|
||||
'plosqa': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
||||
},
|
||||
grain='environment',
|
||||
merge=salt['pillar.get']('group_maps:lookup', None))
|
||||
|
|
Loading…
Reference in a new issue