mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-26 05:40:18 +00:00
9e84276add
Signed-off-by: Christian Krause <christian.krause@idiv.de>
33 lines
1.1 KiB
YAML
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
|