mirror of
https://github.com/saltstack-formulas/users-formula.git
synced 2024-11-28 00:48:22 +01:00
Merge pull request #125 from jraby/Support-for-optional_groups
Support for optional_groups
This commit is contained in:
commit
214f690af7
@ -42,6 +42,9 @@ users:
|
||||
gid: 500
|
||||
groups:
|
||||
- users
|
||||
optional_groups:
|
||||
- some_groups_that_might
|
||||
- not_exist_on_all_minions
|
||||
ssh_key_type: rsa
|
||||
# You can inline the private keys ...
|
||||
ssh_keys:
|
||||
|
@ -135,6 +135,12 @@ users_{{ name }}_user:
|
||||
{% for group in user.get('groups', []) -%}
|
||||
- {{ group }}
|
||||
{% endfor %}
|
||||
{% if 'optional_groups' in user %}
|
||||
- optional_groups:
|
||||
{% for optional_group in user['optional_groups'] -%}
|
||||
- {{optional_group}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
- require:
|
||||
- group: {{ user_group }}
|
||||
{% for group in user.get('groups', []) -%}
|
||||
|
Loading…
Reference in New Issue
Block a user