ansible-collection-prometheus/roles/alertmanager/molecule/alternative/prepare.yml
Christian Krause 9e84276add
enhancement(alertmanager): allows using multiple web listen addresses
Signed-off-by: Christian Krause <christian.krause@idiv.de>
2023-11-28 13:07:31 +01:00

33 lines
1.1 KiB
YAML

---
- name: Run localhost preparation
hosts: localhost
gather_facts: false
tasks:
- name: Download alertmanager binary to local folder
become: false
ansible.builtin.get_url:
url: "https://github.com/prometheus/alertmanager/releases/download/v{{ alertmanager_version\
\ }}/alertmanager-{{ alertmanager_version }}.linux-amd64.tar.gz"
dest: "/tmp/alertmanager-{{ alertmanager_version }}.linux-amd64.tar.gz"
mode: 0644
register: _download_archive
until: _download_archive is succeeded
retries: 5
delay: 2
check_mode: false
- name: Unpack alertmanager binaries
become: false
ansible.builtin.unarchive:
src: "/tmp/alertmanager-{{ alertmanager_version }}.linux-amd64.tar.gz"
dest: "/tmp"
creates: "/tmp/alertmanager-{{ alertmanager_version }}.linux-amd64/alertmanager"
check_mode: false
- name: Link to alertmanager binaries directory
become: false
ansible.builtin.file:
src: "/tmp/alertmanager-{{ alertmanager_version }}.linux-amd64"
dest: "/tmp/alertmanager-linux-amd64"
state: link
check_mode: false