bundles/icinga2: allow limiting permissions for api users

This commit is contained in:
Franzi 2020-12-20 09:33:17 +01:00
parent 374ba3c16a
commit 0b52f8e7e6
Signed by: kunsi
GPG key ID: 12E3D2136B818350
2 changed files with 9 additions and 4 deletions

View file

@ -1,7 +1,7 @@
% for user, password in sorted(node.metadata.get('icinga2', {}).get('api_users', {}).items()):
% for user, config in sorted(node.metadata.get('icinga2', {}).get('api_users', {}).items()):
object ApiUser "${user}" {
password = "${password}"
permissions = [ "*" ]
password = "${config['password']}"
permissions = [ "${'", "'.join(sorted(config['permissions']))}" ]
}
% endfor