Page MenuHomeDevCentral

D2825.id7206.diff
No OneTemporary

D2825.id7206.diff

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

Mime Type
text/plain
Expires
Mon, Dec 23, 05:29 (3 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2311799
Default Alt Text
D2825.id7206.diff (967 B)

Event Timeline