diff --git a/GIDs b/GIDs new file mode 100644 --- /dev/null +++ b/GIDs @@ -0,0 +1 @@ +829 nasqueron-irc diff --git a/pillar/top.sls b/pillar/top.sls --- a/pillar/top.sls +++ b/pillar/top.sls @@ -13,3 +13,4 @@ - users.revokedusers - users.shellusers - users.shelladmins + - users.shellgroups diff --git a/pillar/users/shellgroups.sls b/pillar/users/shellgroups.sls new file mode 100644 --- /dev/null +++ b/pillar/users/shellgroups.sls @@ -0,0 +1,18 @@ +# ------------------------------------------------------------- +# Salt — Service groups list +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Project: Eglide +# Created: 2017-01-24 +# License: Trivial work, not eligible to copyright +# ------------------------------------------------------------- + +# ------------------------------------------------------------- +# Nasqueron +# ------------------------------------------------------------- + +shellgroups: + nasqueron-irc: + gid: 829 + description: Manages IRC bots used for Nasqueron projects + members: + - dereckson diff --git a/roles/shellserver/users/init.sls b/roles/shellserver/users/init.sls --- a/roles/shellserver/users/init.sls +++ b/roles/shellserver/users/init.sls @@ -53,6 +53,15 @@ - {{user}} {% endfor %} +{% for group, args in pillar.get('shellgroups', {}).iteritems() %} +group_{{group}}: + group.present: + - name: {{group}} + - system: False + - gid: {{ args['gid'] }} + - members: {{ args['members'] }} +{% endfor %} + {% if salt['group.info']('root') and salt['group.info']('root')['gid'] == 0 %} rename_root_group_to_wheel: cmd.run: