|
|
|
|
|
|
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
{%- endfor %} |
|
|
{%- endfor %} |
|
|
|
|
|
|
|
|
|
|
|
{%- if user.gid is not defined %} |
|
|
|
|
|
system_group_{{ name }}: |
|
|
|
|
|
group.present: |
|
|
|
|
|
- name: {{ name }} |
|
|
|
|
|
- require_in: |
|
|
|
|
|
- user: system_user_{{ name }} |
|
|
|
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
system_user_{{ name }}: |
|
|
system_user_{{ name }}: |
|
|
user.present: |
|
|
user.present: |
|
|
- name: {{ name }} |
|
|
- name: {{ name }} |
|
|
|
|
|
|
|
|
- password: {{ user.password }} |
|
|
- password: {{ user.password }} |
|
|
- hash_password: {{ user.get('hash_password', False) }} |
|
|
- hash_password: {{ user.get('hash_password', False) }} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
- gid_from_name: false |
|
|
|
|
|
|
|
|
- gid_from_name: true |
|
|
{%- if user.groups is defined %} |
|
|
{%- if user.groups is defined %} |
|
|
- groups: {{ user.groups }} |
|
|
- groups: {{ user.groups }} |
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/etc/sudoers.d/90-salt-user-{{ name|replace('.', '-') }}: |
|
|
/etc/sudoers.d/90-salt-user-{{ name|replace('.', '-') }}: |
|
|
file.absent |
|
|
file.absent |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{%- endif %} |
|
|
{%- endif %} |
|
|
|
|
|
|
|
|
{%- else %} |
|
|
{%- else %} |