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