mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #18096 from gtmanfred/2014.7
add ability to configure config_drive
This commit is contained in:
commit
2ed441780e
@ -491,6 +491,10 @@ def request_instance(vm_=None, call=None):
|
||||
with salt.utils.fopen(userdata_file, 'r') as fp:
|
||||
kwargs['userdata'] = fp.read()
|
||||
|
||||
kwargs['config_drive'] = config.get_cloud_config_value(
|
||||
'config_drive', vm_, __opts__, search_global=False
|
||||
)
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
'requesting instance',
|
||||
|
@ -55,6 +55,8 @@ Set up in the cloud configuration at ``/etc/salt/cloud.providers`` or
|
||||
base_url: http://192.168.1.101:3000/v2/12345
|
||||
provider: openstack
|
||||
userdata_file: /tmp/userdata.txt
|
||||
# config_drive is required for userdata at rackspace
|
||||
config_drive: True
|
||||
|
||||
For in-house Openstack Essex installation, libcloud needs the service_type :
|
||||
|
||||
@ -531,6 +533,10 @@ def request_instance(vm_=None, call=None):
|
||||
with salt.utils.fopen(userdata_file, 'r') as fp:
|
||||
kwargs['ex_userdata'] = fp.read()
|
||||
|
||||
kwargs['ex_config_drive'] = config.get_cloud_config_value(
|
||||
'config_drive', vm_, __opts__, search_global=False
|
||||
)
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
'requesting instance',
|
||||
|
Loading…
Reference in New Issue
Block a user