diff --git a/roles/edpm_download_cache/tasks/container_images.yml b/roles/edpm_download_cache/tasks/container_images.yml index d46861a1b..9be964ccd 100644 --- a/roles/edpm_download_cache/tasks/container_images.yml +++ b/roles/edpm_download_cache/tasks/container_images.yml @@ -55,3 +55,11 @@ tags: - edpm_nova - download_cache + +- name: Download images for edpm_neutron_sriov role + ansible.builtin.include_role: + name: osp.edpm.edpm_neutron_sriov + tasks_from: download_cache.yml + tags: + - edpm_neutron_sriov + - download_cache diff --git a/roles/edpm_neutron_sriov/defaults/main.yml b/roles/edpm_neutron_sriov/defaults/main.yml index 25613143c..859f7b116 100644 --- a/roles/edpm_neutron_sriov/defaults/main.yml +++ b/roles/edpm_neutron_sriov/defaults/main.yml @@ -17,6 +17,12 @@ # All variables intended for modification should be placed in this file. +# seconds between retries for download tasks +edpm_neutron_sriov_images_download_delay: 5 + +# number of retries for download tasks +edpm_neutron_sriov_images_download_retries: 5 + # All variables within this role should have a prefix of "edpm_neutron_sriov_agent" edpm_neutron_sriov_agent_config_src: "/var/lib/openstack/configs/neutron-sriov" edpm_neutron_sriov_agent_config_dir: "/var/lib/config-data/ansible-generated/neutron-sriov-agent" diff --git a/roles/edpm_neutron_sriov/meta/argument_specs.yml b/roles/edpm_neutron_sriov/meta/argument_specs.yml index f35609fa6..56a8abb95 100644 --- a/roles/edpm_neutron_sriov/meta/argument_specs.yml +++ b/roles/edpm_neutron_sriov/meta/argument_specs.yml @@ -4,6 +4,14 @@ argument_specs: main: short_description: The main entry point for the edpm_neutron_sriov role. options: + edpm_neutron_sriov_images_download_delay: + type: int + default: 5 + description: The seconds between retries for failed download tasks + edpm_neutron_sriov_images_download_retries: + type: int + default: 5 + description: The number of retries for failed download tasks edpm_neutron_sriov_agent_config_src: default: "/var/lib/openstack/configs/neutron-sriov" description: | diff --git a/roles/edpm_neutron_sriov/tasks/download_cache.yml b/roles/edpm_neutron_sriov/tasks/download_cache.yml new file mode 100644 index 000000000..7c3c28674 --- /dev/null +++ b/roles/edpm_neutron_sriov/tasks/download_cache.yml @@ -0,0 +1,10 @@ +--- + +- name: Download needed container images + containers.podman.podman_image: + name: "{{ edpm_neutron_sriov_image }}" + become: true + register: edpm_neutron_sriov_images_download + until: edpm_neutron_sriov_images_download.failed == false + retries: "{{ edpm_neutron_sriov_images_download_retries }}" + delay: "{{ edpm_neutron_sriov_images_download_delay }}"