kayobe/ansible/roles/apt/tasks/keys.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

24 lines
453 B
YAML

---
- name: Ensure keys directory exists
file:
path: "{{ apt_keys_path }}"
owner: root
group: root
mode: 0755
state: directory
become: true
- name: Ensure keys exist
get_url:
url: "{{ item.url }}"
dest: "{{ apt_keys_path ~ '/' ~ item.filename | basename }}"
owner: root
group: root
mode: 0644
loop: "{{ apt_keys }}"
become: true
register: result
until: result is successful
retries: 3
delay: 5