Page MenuHomeDevCentral

D858.id2172.diff
No OneTemporary

D858.id2172.diff

diff --git a/GIDs b/GIDs
new file mode 100644
--- /dev/null
+++ b/GIDs
@@ -0,0 +1 @@
+829 nasqueron-irc
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,17 @@
+# -------------------------------------------------------------
+# Salt — Service groups list
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Eglide
+# Created: 2017-01-24
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Nasqueron
+# -------------------------------------------------------------
+
+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,17 @@
- {{user}}
{% endfor %}
+{% for group, args in pillar.get('shellgroups', {}).iteritems() %}
+group_{{group}}:
+ group.present:
+ - system: False
+ - gid: {{ args['gid'] }}
+ - members:
+ {% for user, uargs in args['members'].iteritems() %}
+ - {{user}}
+ {% endfor %}
+{% endfor %}
+
{% if salt['group.info']('root') and salt['group.info']('root')['gid'] == 0 %}
rename_root_group_to_wheel:
cmd.run:

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 05:12 (17 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2307529
Default Alt Text
D858.id2172.diff (1 KB)

Event Timeline