mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Added user_data parameter to nova_compute module - currently no file parsing just text - Re issue #4992
This commit is contained in:
parent
3f2f5fec0a
commit
674969a7d8
1 changed files with 9 additions and 1 deletions
|
@ -107,6 +107,11 @@ options:
|
||||||
- The amount of time the module should wait for the VM to get into active state
|
- The amount of time the module should wait for the VM to get into active state
|
||||||
required: false
|
required: false
|
||||||
default: 180
|
default: 180
|
||||||
|
user_data:
|
||||||
|
description:
|
||||||
|
- Opaque blob of data which is made available to the instance
|
||||||
|
required: false
|
||||||
|
default: None
|
||||||
requirements: ["novaclient"]
|
requirements: ["novaclient"]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -157,6 +162,8 @@ def _create_server(module, nova):
|
||||||
'meta' : module.params['meta'],
|
'meta' : module.params['meta'],
|
||||||
'key_name': module.params['key_name'],
|
'key_name': module.params['key_name'],
|
||||||
'security_groups': module.params['security_groups'].split(','),
|
'security_groups': module.params['security_groups'].split(','),
|
||||||
|
#userdata is unhyphenated in novaclient, but hyphenated here for consistency with the ec2 module:
|
||||||
|
'userdata': module.params['user_data'],
|
||||||
}
|
}
|
||||||
if not module.params['key_name']:
|
if not module.params['key_name']:
|
||||||
del bootkwargs['key_name']
|
del bootkwargs['key_name']
|
||||||
|
@ -227,7 +234,8 @@ def main():
|
||||||
meta = dict(default=None),
|
meta = dict(default=None),
|
||||||
wait = dict(default='yes', choices=['yes', 'no']),
|
wait = dict(default='yes', choices=['yes', 'no']),
|
||||||
wait_for = dict(default=180),
|
wait_for = dict(default=180),
|
||||||
state = dict(default='present', choices=['absent', 'present'])
|
state = dict(default='present', choices=['absent', 'present']),
|
||||||
|
user_data = dict(default=None)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue