updated users state
This commit is contained in:
parent
2f40804e70
commit
2fa5c1fb6a
@ -2,4 +2,4 @@
|
||||
include:
|
||||
- .groups
|
||||
- .users
|
||||
- .ssh-keys
|
||||
- .sshkeys
|
||||
|
@ -2,7 +2,7 @@
|
||||
{%- from "users/map.jinja" import users with context -%}
|
||||
|
||||
{%- for name, user in users.items() %}
|
||||
|
||||
{%- if "sys" in user.roles %}
|
||||
{%- if not user.enabled %}
|
||||
user-{{ name }}:
|
||||
user.absent:
|
||||
@ -20,12 +20,7 @@ user-{{ name }}:
|
||||
- hash_password: true
|
||||
- gid: {{ user.gid }}
|
||||
- allow_gid_change: true
|
||||
{%- if user.optional_groups is defined %}
|
||||
- optional_groups:
|
||||
{%- for opt_group in user.optional_groups %}
|
||||
- {{ opt_group }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{% if user.optional_groups is defined %}- optional_groups: {{ user.optional_groups }}{% endif %}
|
||||
|
||||
user-{{ name }}-config-dir:
|
||||
file.directory:
|
||||
@ -34,5 +29,6 @@ user-{{ name }}-config-dir:
|
||||
- group: {{ user.gid }}
|
||||
- mode: 0755
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user