sync roles with changes from OWS
This commit is contained in:
@@ -11,15 +11,26 @@
|
||||
register: systemd_exporter_version
|
||||
- name: "{{ systemd_exporter_version }}"
|
||||
set_fact:
|
||||
systemd_exporter_version: "{{ systemd_exporter_version | replace ('v', '', 1) | trim }}"
|
||||
systemd_exporter_version: "{{ systemd_exporter_version | replace('v', '', 1) | trim }}"
|
||||
run_once: true
|
||||
|
||||
- name: Download systemd_exporter {{ systemd_exporter_version.tag }} from GitHub
|
||||
- name: Set architecture alias
|
||||
set_fact:
|
||||
architecture_alias: "amd64" # noqa: var-naming[no-role-prefix]
|
||||
when: ansible_architecture == "x86_64"
|
||||
|
||||
- name: Set architecture alias
|
||||
set_fact:
|
||||
architecture_alias: "arm64" # noqa: var-naming[no-role-prefix]
|
||||
when: ansible_architecture == "aarch64"
|
||||
|
||||
- name: "Download systemd_exporter from GitHub (v{{ systemd_exporter_version.tag }})"
|
||||
get_url:
|
||||
url: "https://github.com/povilasv/systemd_exporter/releases/download/\
|
||||
v{{ systemd_exporter_version.tag }}/systemd_exporter-{{ systemd_exporter_version.tag }}\
|
||||
.linux-{{ deb_architecture }}.tar.gz"
|
||||
.linux-{{ architecture_alias }}.tar.gz"
|
||||
dest: "/var/tmp/systemd_exporter.tar.gz"
|
||||
mode: "0644"
|
||||
register: systemd_exporter_download_archive
|
||||
until: systemd_exporter_download_archive is succeeded
|
||||
retries: 3
|
||||
@@ -35,7 +46,7 @@
|
||||
extra_opts:
|
||||
- --strip-components=1
|
||||
include:
|
||||
- "systemd_exporter-{{ systemd_exporter_version.tag }}.linux-{{ deb_architecture }}/systemd_exporter"
|
||||
- "systemd_exporter-{{ systemd_exporter_version.tag }}.linux-{{ architecture_alias }}/systemd_exporter"
|
||||
notify: Restart systemd_exporter
|
||||
|
||||
- name: Copy the systemd_exporter systemd service file
|
||||
|
||||
Reference in New Issue
Block a user