Skip to content

Commit

Permalink
Merge pull request #357 from rebtoor/download-cache-edpm_ovn
Browse files Browse the repository at this point in the history
Enable `download-cache` support in `edpm_ovn` role
  • Loading branch information
openshift-merge-robot authored Sep 25, 2023
2 parents fbef55e + 4a75193 commit d91d3ec
Show file tree
Hide file tree
Showing 4 changed files with 36 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 @@ -24,6 +24,14 @@
- edpm_iscsid
- download_cache

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

- name: Download images for edpm_multipathd role
ansible.builtin.include_role:
name: osp.edpm.edpm_multipathd
Expand Down
7 changes: 7 additions & 0 deletions roles/edpm_ovn/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
# defaults file for edpm_ovn

# seconds between retries for download tasks
edpm_ovn_images_download_delay: 5

# number of retries for download tasks
edpm_ovn_images_download_retries: 5

edpm_ovn_config_src: /var/lib/openstack/configs/ovn
edpm_ovn_neutron_metadata_agent_config_dir: /var/lib/config-data/ansible-generated/neutron-ovn-metadata-agent
edpm_ovn_metadata_agent_log_dir: "/var/log/neutron"
Expand Down
8 changes: 8 additions & 0 deletions roles/edpm_ovn/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_ovn role.
options:
edpm_ovn_images_download_delay:
type: int
default: 5
description: The seconds between retries for failed download tasks
edpm_ovn_images_download_retries:
type: int
default: 5
description: The number of retries for failed download tasks
edpm_enable_chassis_gw:
default: false
description: ''
Expand Down
13 changes: 13 additions & 0 deletions roles/edpm_ovn/tasks/download_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

- name: Download needed container images
containers.podman.podman_image:
name: "{{ item }}"
loop:
- "{{ edpm_ovn_controller_agent_image }}"
- "{{ edpm_ovn_metadata_agent_image }}"
become: true
register: edpm_ovn_images_download
until: edpm_ovn_images_download.failed == false
retries: "{{ edpm_ovn_images_download_retries }}"
delay: "{{ edpm_ovn_images_download_delay }}"

0 comments on commit d91d3ec

Please sign in to comment.