bundles/vmhost: add metadata reactor to add all admins to 'libvirt' group
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
65462ca536
commit
3f38497585
4 changed files with 18 additions and 12 deletions
|
@ -35,3 +35,21 @@ if node.has_bundle('nftables'):
|
|||
'pkg_apt:libvirt-daemon-system',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'users',
|
||||
)
|
||||
def libvirt_group_for_admins(metadata):
|
||||
result = {}
|
||||
for user, config in metadata.get('users', {}).items():
|
||||
if config.get('is_admin', False):
|
||||
result[user] = {
|
||||
'groups': {
|
||||
'libvirt',
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
'users': result,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue