Skip to content

Commit

Permalink
Merge branch 'main' into download-cache-edpm_ovn
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Alfieri <[email protected]>
  • Loading branch information
rebtoor authored Sep 25, 2023
2 parents e54bfa1 + 9999a29 commit 4a75193
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 0 deletions.
16 changes: 16 additions & 0 deletions roles/edpm_download_cache/tasks/container_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,26 @@
- edpm_ovn
- download_cache

- name: Download images for edpm_multipathd role
ansible.builtin.include_role:
name: osp.edpm.edpm_multipathd
tasks_from: download_cache.yml
tags:
- edpm_multipathd
- download_cache

- name: Download images for edpm_libvirt role
ansible.builtin.include_role:
name: osp.edpm.edpm_libvirt
tasks_from: download_cache.yml
tags:
- edpm_libvirt
- download_cache

- name: Download images for edpm_nova role
ansible.builtin.include_role:
name: osp.edpm.edpm_nova
tasks_from: download_cache.yml
tags:
- edpm_nova
- download_cache
3 changes: 3 additions & 0 deletions roles/edpm_multipathd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ edpm_container_cli: "{{ container_cli | default('podman') }}"
# All variables intended for modification should be placed in this file.

edpm_multipathd_image: "quay.io/podified-antelope-centos9/openstack-multipathd:current-podified"
edpm_multipathd_image_download_delay: 5
edpm_multipathd_image_download_retries: 5

edpm_multipathd_command: "/usr/sbin/multipathd -d"
edpm_multipathd_volumes:
- /var/lib/kolla/config_files/multipathd.json:/var/lib/kolla/config_files/config.json:ro
Expand Down
8 changes: 8 additions & 0 deletions roles/edpm_multipathd/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ argument_specs:
default: 'quay.io/podified-antelope-centos9/openstack-multipathd:current-podified'
description: 'URL of the multipathd image.'
type: str
edpm_multipathd_image_download_delay:
type: int
default: 5
description: The seconds between retries for failed download tasks
edpm_multipathd_image_download_retries:
type: int
default: 5
description: The number of retries for failed download tasks
edpm_multipathd_command:
default: '/usr/sbin/multipathd -d'
description: 'The command to start the multipathd daemon.'
Expand Down
10 changes: 10 additions & 0 deletions roles/edpm_multipathd/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

- name: Download needed container
containers.podman.podman_image:
name: "{{ edpm_multipathd_image }}"
become: true
register: edpm_multipathd_image_download
until: edpm_multipathd_image_download.failed == false
retries: "{{ edpm_multipathd_image_download_retries }}"
delay: "{{ edpm_multipathd_image_download_delay }}"
7 changes: 7 additions & 0 deletions roles/edpm_nova/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@


# All variables intended for modification should be placed in this file.

# seconds between retries for download tasks
edpm_nova_image_download_delay: 5

# number of retries for download tasks
edpm_nova_image_download_retries: 5

# Note that the src dir is in the AEE container but the
# dest dir is on the target host
edpm_nova_config_src: /var/lib/openstack/configs
Expand Down
8 changes: 8 additions & 0 deletions roles/edpm_nova/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ argument_specs:
main:
short_description: The main entry point for the edpm_nova role.
options:
edpm_nova_image_download_delay:
type: int
default: 5
description: The seconds between retries for failed download tasks
edpm_nova_image_download_retries:
type: int
default: 5
description: The number of retries for failed download tasks
edpm_nova_config_src:
type: str
default: /var/lib/openstack/config
Expand Down
10 changes: 10 additions & 0 deletions roles/edpm_nova/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

- name: Download needed container image
containers.podman.podman_image:
name: "{{ edpm_nova_compute_image }}"
become: true
register: edpm_nova_image_download
until: edpm_nova_image_download.failed == false
retries: "{{ edpm_nova_image_download_retries }}"
delay: "{{ edpm_nova_image_download_delay }}"

0 comments on commit 4a75193

Please sign in to comment.