mirror of
https://github.com/saltstack-formulas/users-formula.git
synced 2024-11-28 00:48:22 +01:00
Added sudoonly switch. Usage implies setting sudouser to True
This commit is contained in:
parent
e03458bb31
commit
72ef35fdfa
@ -9,6 +9,9 @@
|
||||
{%- if user == None -%}
|
||||
{%- set user = {} -%}
|
||||
{%- endif -%}
|
||||
{%- if 'sudoonly' in user and user['sudoonly'] %}
|
||||
{%- set _dummy=user.update({'sudouser': True}) %}
|
||||
{%- endif %}
|
||||
{%- if 'sudouser' in user and user['sudouser'] %}
|
||||
{%- do used_sudo.append(1) %}
|
||||
{%- endif %}
|
||||
@ -47,6 +50,7 @@ include:
|
||||
{%- set user_group = name -%}
|
||||
{%- endif %}
|
||||
|
||||
{%- if not ( 'sudoonly' in user and user['sudoonly'] ) %}
|
||||
{% for group in user.get('groups', []) %}
|
||||
users_{{ name }}_{{ group }}_group:
|
||||
group.present:
|
||||
@ -353,6 +357,7 @@ users_ssh_known_hosts_delete_{{ name }}_{{ loop.index0 }}:
|
||||
- name: {{ host }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% set sudoers_d_filename = name|replace('.','_') %}
|
||||
{% if 'sudouser' in user and user['sudouser'] %}
|
||||
|
Loading…
Reference in New Issue
Block a user