|
|
@@ -11,6 +11,13 @@ |
|
|
|
|
|
|
|
{%- if group.enabled %} |
|
|
|
|
|
|
|
{%- set requires = [] %} |
|
|
|
{%- for user in group.get('addusers', []) %} |
|
|
|
{%- if user in system.get('user', {}).keys() %} |
|
|
|
{%- do requires.append({'user': 'system_user_'+user}) %} |
|
|
|
{%- endif %} |
|
|
|
{%- endfor %} |
|
|
|
|
|
|
|
system_group_{{ group_name }}: |
|
|
|
group.present: |
|
|
|
- name: {{ group.get('name', group_name) }} |
|
|
@@ -20,6 +27,7 @@ system_group_{{ group_name }}: |
|
|
|
{%- if group.gid is defined and group.gid %} |
|
|
|
- gid: {{ group.gid }} |
|
|
|
{%- endif %} |
|
|
|
- require: {{ requires|yaml }} |
|
|
|
{{ set_p('addusers', group)|indent(2, True) }} |
|
|
|
{{ set_p('delusers', group)|indent(2, True) }} |
|
|
|
|