|
|
|
|
|
|
|
|
{%- if user == None -%} |
|
|
{%- if user == None -%} |
|
|
{%- set user = {} -%} |
|
|
{%- set user = {} -%} |
|
|
{%- endif -%} |
|
|
{%- endif -%} |
|
|
|
|
|
{%- if 'sudoonly' in user and user['sudoonly'] %} |
|
|
|
|
|
{%- set _dummy=user.update({'sudouser': True}) %} |
|
|
|
|
|
{%- endif %} |
|
|
{%- if 'sudouser' in user and user['sudouser'] %} |
|
|
{%- if 'sudouser' in user and user['sudouser'] %} |
|
|
{%- do used_sudo.append(1) %} |
|
|
{%- do used_sudo.append(1) %} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
{%- set user_group = name -%} |
|
|
{%- set user_group = name -%} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
|
|
|
{%- if not ( 'sudoonly' in user and user['sudoonly'] ) %} |
|
|
{% for group in user.get('groups', []) %} |
|
|
{% for group in user.get('groups', []) %} |
|
|
users_{{ name }}_{{ group }}_group: |
|
|
users_{{ name }}_{{ group }}_group: |
|
|
group.present: |
|
|
group.present: |
|
|
|
|
|
|
|
|
- name: {{ host }} |
|
|
- name: {{ host }} |
|
|
{% endfor %} |
|
|
{% endfor %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
{% set sudoers_d_filename = name|replace('.','_') %} |
|
|
{% set sudoers_d_filename = name|replace('.','_') %} |
|
|
{% if 'sudouser' in user and user['sudouser'] %} |
|
|
{% if 'sudouser' in user and user['sudouser'] %} |