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

adding ability to set openstack image ids

This commit is contained in:
Peter Shrom 2017-03-03 13:08:03 -05:00 committed by Brian Coca
parent 6608629d25
commit de5fb8d98c

View file

@ -38,6 +38,11 @@ options:
- Name that has to be given to the image
required: true
default: None
id:
description:
- The Id of the image
required: false
default: None
disk_format:
description:
- The format of the disk that is getting uploaded
@ -131,6 +136,7 @@ def main():
argument_spec = openstack_full_argument_spec(
name = dict(required=True),
id = dict(default=None),
disk_format = dict(default='qcow2', choices=['ami', 'ari', 'aki', 'vhd', 'vmdk', 'raw', 'qcow2', 'vdi', 'iso', 'vhdx', 'ploop']),
container_format = dict(default='bare', choices=['ami', 'aki', 'ari', 'bare', 'ovf', 'ova', 'docker']),
owner = dict(default=None),
@ -159,6 +165,7 @@ def main():
if not image:
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'],