Allow to override profile options in lxc.cloud_init_interface

Allows to set LXC template specific options in salt-cloud profile.

For example:

wheezy-profile:
   provider: lxc-provider
   image: debian
   options:
     release: wheezy
This commit is contained in:
cellscape 2015-05-08 12:26:23 +06:00
parent 42bd64b9b3
commit 792e1021f2

View file

@ -179,12 +179,15 @@ def cloud_init_interface(name, vm_=None, **kwargs):
size = vm_.get('size', '20G')
script = vm_.get('script', None)
script_args = vm_.get('script_args', None)
options = vm_.get('options', None)
if image:
profile['template'] = image
if vgname:
profile['vgname'] = vgname
if backing:
profile['backing'] = backing
if options:
profile.update(options)
users = vm_.get('users', None)
if users is None:
users = []