Browse Source

Added ability to enable SETENV in sudoers

Change-Id: Icee295720a5a2425390a1bcd588841897071938e
users_deps
Jakub Josef 7 years ago
parent
commit
7a9d9b9cca
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      README.rst
  2. +1
    -1
      linux/files/sudoer-users

+ 1
- 0
README.rst View File

salt-ops-2nd: salt-ops-2nd:
name: salt-ops name: salt-ops
nopasswd: false nopasswd: false
setenv: true # Enable sudo -E option
runas: runas:
- DBA - DBA
commands: commands:

+ 1
- 1
linux/files/sudoer-users View File

# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN


{%- for user,spec in users.iteritems() %} {%- for user,spec in users.iteritems() %}
{{ spec.name|default(user) }} {{ spec.get('hosts', ['ALL'])|join(',') }}=({{ spec.get('runas', ['ALL'])|join(', ') }}) {% if spec.get('nopasswd', True) %}NOPASSWD: {% endif %}{{ spec.get('commands', ['ALL'])|join(', ') }}
{{ spec.name|default(user) }} {{ spec.get('hosts', ['ALL'])|join(',') }}=({{ spec.get('runas', ['ALL'])|join(', ') }}) {% if spec.get('nopasswd', True) %}NOPASSWD:{% endif %}{% if spec.get('setenv', False) %}SETENV:{% endif %} {{ spec.get('commands', ['ALL'])|join(', ') }}
{%- endfor %} {%- endfor %}



Loading…
Cancel
Save