Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3934812
D2825.id7207.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
967 B
Referenced Files
None
Subscribers
None
D2825.id7207.diff
View Options
diff --git a/_modules/forest.py b/_modules/forest.py
--- a/_modules/forest.py
+++ b/_modules/forest.py
@@ -120,3 +120,15 @@
users[username] = _get_user(forest, username)
return users
+
+
+def get_wheel_users():
+ """
+ A function to get users to provision to the wheel group.
+
+ CLI Example::
+
+ salt '*' forest.get_wheel_users
+ """
+
+ return ["root", *__pillar__["shellgroups"]["ops"]["members"]]
diff --git a/roles/core/users/init.sls b/roles/core/users/init.sls
--- a/roles/core/users/init.sls
+++ b/roles/core/users/init.sls
@@ -111,6 +111,14 @@
- members: {{ group['members'] }}
{% endfor %}
+{% if grains["os"] == "FreeBSD" %}
+group_wheel:
+ group.present:
+ - name: wheel
+ - gid: 0
+ - members: {{ salt["forest.get_wheel_users"]() }}
+{% endif %}
+
# -------------------------------------------------------------
# SSH keys
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 06:24 (19 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2311799
Default Alt Text
D2825.id7207.diff (967 B)
Attached To
Mode
D2825: Provision wheel group on FreeBSD servers
Attached
Detach File
Event Timeline
Log In to Comment