diff --git a/galaxy.yml b/galaxy.yml index 152e837..231b435 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: stackhpc name: openstack -version: 0.3.0 +version: 0.4.0 readme: README.md authors: - StackHPC Ltd diff --git a/roles/os_images/README.md b/roles/os_images/README.md index fd9a008..a70da5d 100644 --- a/roles/os_images/README.md +++ b/roles/os_images/README.md @@ -72,6 +72,9 @@ mutually exclusive where each contain: * `visibility`: (optional) Allowed values are 'public', 'private', 'shared' or 'community'. Default is 'public' * `owner`: (optional) ID of the project that should own the uploaded image. +* `use_import`: (optional) Whether to use an import workflow instead of direct upload. + Useful in conjuction with an [interoperable image import](https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html). + Defaults to 'false'. `os_images_common`: A set of elements to include in every image listed. Defaults to `cloud-init enable-serial-console stable-interface-names`. diff --git a/roles/os_images/tasks/upload.yml b/roles/os_images/tasks/upload.yml index 8653098..0e1fb9f 100644 --- a/roles/os_images/tasks/upload.yml +++ b/roles/os_images/tasks/upload.yml @@ -113,6 +113,7 @@ properties: "{{ os_images_common_properties | combine(item.0.properties | default({})) or omit }}" kernel: "{{ item.1.id if is_baremetal else omit }}" ramdisk: "{{ item.2.id if is_baremetal else omit }}" + use_import: "{{ item.0.use_import | default(omit) }}" vars: is_baremetal: "{{ item.0.elements is defined and 'baremetal' in item.0.elements }}" visibility: "{{ item.0.visibility | default(item.0.is_public | ternary('public', 'private') if item.0.is_public is defined else os_images_visibility) }}"