How to 'append' admin rules without overwriting older rules?
I'm using ansible to set up our systems and want to give users of the group 'sysadmin' admin privileges in polkit. So I created this file:
/etc/polkit-1/rules.d/40-sysadmin.rules:
polkit.addAdminRule(function(action, subject) {
return ["unix-group:sysadmin"];
});
The other files in this directory are:
- 49-polkit-pkla-compat.rules
- 50-default.rules
Since the file name of my new file has a lower number compared the two old files it will be read first, and since it returns a valid value - the rules in the two other files won't be applied.
I would prefer to 'append' my new rule, instead of replacing the existing ones - is that possible? How?