ansible-collection-prometheus/roles/cadvisor/tasks/preflight.yml
gardar 3259947a89
refactor(cadvisor): delegate common tasks to _common role
Signed-off-by: gardar <gardar@users.noreply.github.com>
2024-10-15 17:03:59 +00:00

21 lines
655 B
YAML

---
- name: Common preflight
ansible.builtin.include_role:
name: prometheus.prometheus._common
tasks_from: preflight.yml
- name: Discover latest version
ansible.builtin.set_fact:
cadvisor_version: "{{ (lookup('url', 'https://api.github.com/repos/{{ _cadvisor_repo }}/releases/latest', headers=_github_api_headers,
split_lines=False) | from_json).get('tag_name') | replace('v', '') }}"
run_once: true
until: cadvisor_version is version('0.0.0', '>=')
retries: 10
when:
- cadvisor_version == "latest"
tags:
- cadvisor
- install
- cadvisor_install
- download
- cadvisor_download