1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix os_image so it works when id is None (#29147)

Fixes #29145
This commit is contained in:
Joshua C. Randall 2017-09-09 19:16:48 +01:00 committed by Monty Taylor
parent 4de6076d78
commit 6e84baddb6

View file

@ -164,9 +164,11 @@ def main():
if module.params['state'] == 'present':
if not image:
kwargs={}
if module.params['id'] is not None:
kwargs['id'] = module.params['id']
image = cloud.create_image(
name=module.params['name'],
id=module.params['id'],
filename=module.params['filename'],
disk_format=module.params['disk_format'],
container_format=module.params['container_format'],
@ -174,7 +176,8 @@ def main():
timeout=module.params['timeout'],
is_public=module.params['is_public'],
min_disk=module.params['min_disk'],
min_ram=module.params['min_ram']
min_ram=module.params['min_ram'],
**kwargs
)
changed = True
if not module.params['wait']: