added groups and polkit rules

This commit is contained in:
Jonas Forsberg 2020-08-17 08:03:41 +02:00
parent b741ad58fc
commit 5b812c749a
No known key found for this signature in database
GPG Key ID: F2E9818C70350CC9
5 changed files with 17 additions and 0 deletions

View File

@ -10,3 +10,7 @@ packages:
firefox:
addons:
Okta Browser Plugin: https://addons.mozilla.org/en-US/firefox/addon/okta-browser-plugin/
groups:
libvirt:
kvm:

View File

@ -6,6 +6,7 @@ base:
- hosts
- repos.google_chrome
- firewalld
- groups
{% if grains['os'] == "SUSE" -%}
- repos.packman
{% endif %}

View File

@ -0,0 +1,3 @@
polkit.addAdminRule(function(action, subject) {
return ["unix-group:wheel"];
});

7
salt/states/groups.sls Normal file
View File

@ -0,0 +1,7 @@
add {{ pillar['username'] }} to optional groups:
user.present:
- name: {{ pillar['username'] }}
- optional_groups:
{% for group, args in pillar['groups'].items() -%}
- {{ group }}
{% endfor %}

View File

@ -7,3 +7,5 @@ base:
- firefox
- sudo
- firewalld
- groups
- polkit