kayobe/ansible/roles/dell-switch-bmp/tasks/main.yml
Mark Goddard 2951f26ad1 Add retries to get_url and uri tasks
These tasks occasionally fail in CI, causing jobs to fail.

Change-Id: I89041a641d8cb66c7848fa9ae9264a51aa1e38c8
2023-04-20 10:25:36 +01:00

27 lines
765 B
YAML

---
- name: Ensure dnsmasq configuration is present
template:
src: dell-switch-bmp.conf.j2
dest: /etc/kolla/bifrost/dell-switch-bmp.conf
notify:
- Copy dnsmasq configuration
- Restart bifrost dnsmasq
become: True
- name: Ensure Dell BMP installer images are downloaded
get_url:
url: "{{ item.url }}"
dest: "/etc/kolla/bifrost/{{ item.dest }}"
# If no checksum is provided, download images every time to ensure changes
# are pulled.
force: "{{ omit if item.checksum is defined else 'yes' }}"
checksum: "{{ item.checksum | default(omit) }}"
with_items: "{{ dell_switch_bmp_images }}"
notify:
- Copy Dell switch BMP images
become: True
register: result
until: result is successful
retries: 3
delay: 5