mirror of
https://github.com/saltstack-formulas/users-formula.git
synced 2024-11-28 02:57:55 +01:00
groups: support absent
like for users.
Also remove warning for passing unknown arguments on group.absent
This commit is contained in:
parent
b8c6844e10
commit
7845013a39
@ -5,13 +5,17 @@
|
|||||||
{% set used_user_files = [] %}
|
{% set used_user_files = [] %}
|
||||||
|
|
||||||
{% for group, setting in salt['pillar.get']('groups', {}).items() %}
|
{% for group, setting in salt['pillar.get']('groups', {}).items() %}
|
||||||
users_group_{{ setting.get('state', "present") }}_{{ group }}:
|
{% if setting.absent is defined and setting.absent or setting.get('state', "present") == 'absent' %}
|
||||||
group.{{ setting.get('state', "present") }}:
|
users_group_absent_{{ group }}:
|
||||||
|
group.absent:
|
||||||
- name: {{ group }}
|
- name: {{ group }}
|
||||||
{%- if setting.get('gid') %}
|
{% else %}
|
||||||
- gid: {{setting.get('gid') }}
|
users_group_present_{{ group }}:
|
||||||
{%- endif %}
|
group.present:
|
||||||
|
- name: {{ group }}
|
||||||
|
- gid: {{ setting.get('gid') }}
|
||||||
- system: {{ setting.get('system',"False") }}
|
- system: {{ setting.get('system',"False") }}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{%- for name, user in pillar.get('users', {}).items()
|
{%- for name, user in pillar.get('users', {}).items()
|
||||||
|
Loading…
Reference in New Issue
Block a user