|
|
|
|
|
|
|
|
# vim: sts=2 ts=2 sw=2 et ai |
|
|
# vim: sts=2 ts=2 sw=2 et ai |
|
|
{% from "users/map.jinja" import users with context %} |
|
|
{% from "users/map.jinja" import users with context %} |
|
|
|
|
|
|
|
|
include: |
|
|
|
|
|
- users.sudo |
|
|
|
|
|
|
|
|
{% set used_sudo = False %} |
|
|
|
|
|
|
|
|
{% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} |
|
|
{% for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %} |
|
|
{%- if user == None -%} |
|
|
{%- if user == None -%} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% if 'sudouser' in user and user['sudouser'] %} |
|
|
{% if 'sudouser' in user and user['sudouser'] %} |
|
|
|
|
|
{% if not used_sudo %} |
|
|
|
|
|
{% set used_sudo = True %} |
|
|
|
|
|
include: |
|
|
|
|
|
- users.sudo |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
sudoer-{{ name }}: |
|
|
sudoer-{{ name }}: |
|
|
file.managed: |
|
|
file.managed: |
|
|
- name: {{ users.sudoers_dir }}{{ name }} |
|
|
- name: {{ users.sudoers_dir }}{{ name }} |