mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-05-07 05:43:15 +00:00
Add bootable volume support
Add support for setting volumes to be bootable on creation, as well as support for updating the bootable flag. Closes-Bug: #2137559 Change-Id: I60bac613060551c4d6144675b1553b4fdda2d13d Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
This commit is contained in:
@@ -12,14 +12,35 @@
|
||||
that: item in vol.volume
|
||||
loop: "{{ expected_fields }}"
|
||||
|
||||
- name: Create volume from existing volume
|
||||
- assert:
|
||||
that: not vol.volume.is_bootable
|
||||
|
||||
- name: Create bootable volume from existing volume
|
||||
openstack.cloud.volume:
|
||||
cloud: "{{ cloud }}"
|
||||
state: present
|
||||
size: 1
|
||||
volume: "{{ vol.volume.id }}"
|
||||
name: ansible_volume1
|
||||
is_bootable: true
|
||||
description: Test volume
|
||||
register: vol
|
||||
|
||||
- assert:
|
||||
that: vol.volume.is_bootable
|
||||
|
||||
- name: Make the first volume bootable
|
||||
openstack.cloud.volume:
|
||||
cloud: "{{ cloud }}"
|
||||
state: present
|
||||
size: 1
|
||||
name: ansible_volume
|
||||
is_bootable: true
|
||||
description: Test volume
|
||||
register: vol
|
||||
|
||||
- assert:
|
||||
that: vol.volume.is_bootable
|
||||
|
||||
- name: Delete volume
|
||||
openstack.cloud.volume:
|
||||
|
||||
Reference in New Issue
Block a user