initial version of vmhost bundle
This commit is contained in:
parent
ecc7d98114
commit
3934414140
2 changed files with 16 additions and 0 deletions
5
bundles/vmhost/items.py
Normal file
5
bundles/vmhost/items.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
pkg_apt = {
|
||||||
|
'qemu-kvm': {},
|
||||||
|
'libvirt-clients': {},
|
||||||
|
'libvirt-daemon-system': {},
|
||||||
|
}
|
11
bundles/vmhost/metadata.py
Normal file
11
bundles/vmhost/metadata.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
@metadata_processor
|
||||||
|
def add_users_to_libvirt_group(metadata):
|
||||||
|
if 'users' in metadata:
|
||||||
|
for user in metadata['users']:
|
||||||
|
if 'groups' not in metadata['users'][user]:
|
||||||
|
metadata['users'][user]['groups'] = []
|
||||||
|
|
||||||
|
if 'libvirt' not in metadata['users'][user]['groups']:
|
||||||
|
metadata['users'][user]['groups'].append('libvirt')
|
||||||
|
|
||||||
|
return metadata, RUN_ME_AGAIN
|
Loading…
Reference in a new issue