sync roles with changes from OWS

This commit is contained in:
Oli
2023-10-21 13:13:20 +00:00
parent e14271eab0
commit ccd75528ed
43 changed files with 479 additions and 107 deletions

View File

@@ -14,11 +14,21 @@
mysqld_exporter_version: "{{ mysqld_exporter_version | replace ('v', '', 1) | trim }}"
run_once: true
- 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 mysqld_exporter {{ mysqld_exporter_version.tag }} from GitHub
get_url:
url: "https://github.com/prometheus/mysqld_exporter/releases/download/\
v{{ mysqld_exporter_version.tag }}/mysqld_exporter-{{ mysqld_exporter_version.tag }}\
.linux-{{ deb_architecture }}.tar.gz"
.linux-{{ architecture_alias }}.tar.gz"
dest: "/var/tmp/mysqld_exporter.tar.gz"
register: mysqld_exporter_download_archive
until: mysqld_exporter_download_archive is succeeded
@@ -35,7 +45,7 @@
extra_opts:
--strip-components=1
include:
- "mysqld_exporter-{{ mysqld_exporter_version.tag }}.linux-{{ deb_architecture }}/mysqld_exporter"
- "mysqld_exporter-{{ mysqld_exporter_version.tag }}.linux-{{ architecture_alias }}/mysqld_exporter"
notify: Restart mysqld_exporter
- name: Copy the mysqld_exporter systemd service file