From da07b98b7a433493728ddb7ac7efbd20b8988776 Mon Sep 17 00:00:00 2001 From: Adam Nowotny Date: Fri, 27 Dec 2019 06:34:17 +0100 Subject: [PATCH] os_volume: optional bootable parameter for volume (#43945) --- lib/ansible/modules/cloud/openstack/os_volume.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/openstack/os_volume.py b/lib/ansible/modules/cloud/openstack/os_volume.py index 91c5e57b15..ffd885f744 100644 --- a/lib/ansible/modules/cloud/openstack/os_volume.py +++ b/lib/ansible/modules/cloud/openstack/os_volume.py @@ -46,6 +46,12 @@ options: description: - Volume name or id to create from version_added: "2.3" + bootable: + description: + - Bootable flag for volume. + type: bool + default: False + version_added: "2.10" state: description: - Should the resource be present or absent. @@ -166,6 +172,7 @@ def _present_volume(module, cloud): display_name=module.params['display_name'], display_description=module.params['display_description'], snapshot_id=module.params['snapshot_id'], + bootable=module.params['bootable'], availability_zone=module.params['availability_zone'], ) if module.params['image']: @@ -228,7 +235,8 @@ def main(): volume=dict(default=None), state=dict(default='present', choices=['absent', 'present']), scheduler_hints=dict(default=None, type='dict'), - metadata=dict(default=None, type='dict') + metadata=dict(default=None, type='dict'), + bootable=dict(type='bool', default=False) ) module_kwargs = openstack_module_kwargs( mutually_exclusive=[