Selaa lähdekoodia

groups: support `absent` like for users.

Also remove warning for passing unknown arguments on group.absent
tags/v0.45.0
Adrien "ze" Urban 5 vuotta sitten
vanhempi
commit
7845013a39
1 muutettua tiedostoa jossa 9 lisäystä ja 5 poistoa
  1. +9
    -5
      users/init.sls

+ 9
- 5
users/init.sls Näytä tiedosto

@@ -5,13 +5,17 @@
{% set used_user_files = [] %}

{% for group, setting in salt['pillar.get']('groups', {}).items() %}
users_group_{{ setting.get('state', "present") }}_{{ group }}:
group.{{ setting.get('state', "present") }}:
{% if setting.absent is defined and setting.absent or setting.get('state', "present") == 'absent' %}
users_group_absent_{{ group }}:
group.absent:
- name: {{ group }}
{%- if setting.get('gid') %}
- gid: {{setting.get('gid') }}
{%- endif %}
{% else %}
users_group_present_{{ group }}:
group.present:
- name: {{ group }}
- gid: {{ setting.get('gid') }}
- system: {{ setting.get('system',"False") }}
{% endif %}
{% endfor %}

{%- for name, user in pillar.get('users', {}).items()

Loading…
Peruuta
Tallenna