Skip to content

Commit

Permalink
Merge pull request #371 from slawqo/download-cache
Browse files Browse the repository at this point in the history
Enable download-cache support in edpm_neutron_sriov role
  • Loading branch information
openshift-merge-robot authored Sep 26, 2023
2 parents fc0cc7d + 4f76c57 commit 076b77d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/edpm_download_cache/tasks/container_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions roles/edpm_neutron_sriov/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions roles/edpm_neutron_sriov/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_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: |
Expand Down
10 changes: 10 additions & 0 deletions roles/edpm_neutron_sriov/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -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 }}"

0 comments on commit 076b77d

Please sign in to comment.