sync roles with changes from OWS
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
---
|
||||
- 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: Add MariaDB GPG apt key
|
||||
apt_key:
|
||||
url: https://mariadb.org/mariadb_release_signing_key.asc
|
||||
@@ -7,7 +17,7 @@
|
||||
|
||||
- name: Add MariaDB Repository
|
||||
apt_repository:
|
||||
repo: "deb [arch={{ deb_architecture }} signed-by=/usr/share/keyrings/mariadb_release_signing_key.gpg] \
|
||||
repo: "deb [arch={{ architecture_alias }} signed-by=/usr/share/keyrings/mariadb_release_signing_key.gpg] \
|
||||
https://mirrors.n-ix.net/mariadb/repo/{{ mariadb_server_version }}/ubuntu {{ ansible_distribution_release }} main/debug"
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user