migrating over to aws
This commit is contained in:
parent
33e267a6cc
commit
cea9a67ef9
|
@ -1,4 +1,4 @@
|
||||||
{% from "sudoers/map.jinja" import ad_group_maps with context %}
|
{% from "sudoers/map.jinja" import plos_group_maps with context %}
|
||||||
{%- if (not included) %}
|
{%- if (not included) %}
|
||||||
{%- set sudoers = pillar.get('sudoers', {}) %}
|
{%- set sudoers = pillar.get('sudoers', {}) %}
|
||||||
{%- if grains['os_family'] == 'Debian' %}
|
{%- if grains['os_family'] == 'Debian' %}
|
||||||
|
@ -95,11 +95,11 @@ Runas_Alias {{ name }} = {{ ",".join(runas) }}
|
||||||
%{{ group }} {{ spec }}
|
%{{ group }} {{ spec }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- for unix_group in ad_groups %}
|
{%- for unix_group in plos_groups %}
|
||||||
{%- if unix_group in ad_group_maps.keys() %}
|
{%- if unix_group in plos_group_maps.keys() %}
|
||||||
%{{ unix_group }} {{ ad_group_maps[unix_group] }}
|
%{{ unix_group }} {{ plos_group_maps[unix_group] }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
%{{ unix_group }} {{ ad_group_maps['default'] }}
|
%{{ unix_group }} {{ plos_group_maps['default'] }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% from "sudoers/map.jinja" import sudoers with context %}
|
{% from "sudoers/map.jinja" import sudoers with context %}
|
||||||
|
|
||||||
# our list of plos core active directory groups
|
# our list of plos core active directory groups
|
||||||
{%- set ad_groups = salt['pillar.get']('group_map:core').keys() %}
|
{%- set plos_groups = salt['pillar.get']('group_map:core').keys() %}
|
||||||
|
|
||||||
sudo:
|
sudo:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
|
@ -17,6 +17,6 @@ sudo:
|
||||||
- check_cmd: {{ sudoers.get('exec-prefix', '/usr/sbin') }}/visudo -c -f
|
- check_cmd: {{ sudoers.get('exec-prefix', '/usr/sbin') }}/visudo -c -f
|
||||||
- context:
|
- context:
|
||||||
included: False
|
included: False
|
||||||
ad_groups: {{ ad_groups|tojson }}
|
plos_groups: {{ plos_groups|tojson }}
|
||||||
- require:
|
- require:
|
||||||
- pkg: sudo
|
- pkg: sudo
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
}, merge=salt['pillar.get']('sudoers:lookup', None)) %}
|
}, merge=salt['pillar.get']('sudoers:lookup', None)) %}
|
||||||
|
|
||||||
# our plos active directory core groups sudoers permissions, filtered by environment
|
# our plos active directory core groups sudoers permissions, filtered by environment
|
||||||
{% set ad_group_maps = salt['grains.filter_by']({
|
{% set plos_group_maps = salt['grains.filter_by']({
|
||||||
'default': { 'default': 'ALL = (root) NOEXEC:NOPASSWD: SUPPORT' },
|
'default': { 'default': 'ALL = (root) NOEXEC:NOPASSWD: SUPPORT' },
|
||||||
'vagrant': { 'default': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
'vagrant': { 'default': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
||||||
'dev': { 'default': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
'dev': { 'default': 'ALL = (ALL:ALL) NOPASSWD: ALL' },
|
||||||
|
|
Loading…
Reference in New Issue