Page MenuHomeDevCentral

D2825.diff
No OneTemporary

D2825.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
Sun, Nov 17, 15:42 (9 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2248671
Default Alt Text
D2825.diff (967 B)

Event Timeline