Skip to content

Commit c245d8a

Browse files
committed
Fix format and merge separated dependency installation
1 parent 8770987 commit c245d8a

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

etc/kayobe/ansible/openstack-host-image-upload.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232

3333
- name: Ensure dependencies are installed
3434
ansible.builtin.pip:
35-
name: openstacksdk
35+
name:
36+
- openstacksdk
37+
- python-openstackclient
3638

3739
- name: Upload an image to Glance
3840
openstack.cloud.image:
@@ -45,18 +47,13 @@
4547
visibility: shared
4648
register: image
4749

48-
- name: Ensure dependencies are installed
49-
pip:
50-
name: python-openstackclient
51-
virtualenv: "{{ ansible_python_interpreter | dirname | dirname }}"
52-
5350
# Add the image to the chosen project
5451
- name: Add image to stackhpc-dev project
55-
command: "{{ ansible_python_interpreter | dirname | dirname }}/bin/openstack image add project {{ image.image.id }} '{{ lookup('ansible.builtin.env', 'HOST_IMAGE_BUILD_SHARE_PROJECT_ID') }}'"
52+
ansible.builtin.command: "openstack image add project {{ image.image.id }} '{{ lookup('ansible.builtin.env', 'HOST_IMAGE_BUILD_SHARE_PROJECT_ID') }}'"
5653

5754
# Accept the image in the receiving project
5855
- name: Accept image membership in stackhpc-dev project
59-
command: "{{ ansible_python_interpreter | dirname | dirname }}/bin/openstack image set {{ image.image.id }} --project '{{ lookup('ansible.builtin.env', 'HOST_IMAGE_BUILD_SHARE_PROJECT_ID') }}' --accept"
56+
ansible.builtin.command: "openstack image set {{ image.image.id }} --project '{{ lookup('ansible.builtin.env', 'HOST_IMAGE_BUILD_SHARE_PROJECT_ID') }}' --accept"
6057

6158
always:
6259
- name: Remove clouds.yaml

0 commit comments

Comments
 (0)