From 907aa21e112716a5434d3f52def10290e29cdef9 Mon Sep 17 00:00:00 2001 From: floerica <115068529+floerica@users.noreply.github.com> Date: Sun, 14 Apr 2024 08:50:21 +0200 Subject: [PATCH 1/4] Update suse.yml --- roles/grafana/vars/distro/suse.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/grafana/vars/distro/suse.yml b/roles/grafana/vars/distro/suse.yml index 5dfc0fdf..56486dfe 100644 --- a/roles/grafana/vars/distro/suse.yml +++ b/roles/grafana/vars/distro/suse.yml @@ -1,2 +1,6 @@ --- grafana_package: "grafana{{ (grafana_version != 'latest') | ternary('-' ~ grafana_version, '') }}" +# https://unix.stackexchange.com/questions/534463/cant-enable-grafana-on-boot-in-fedora-because-systemd-sysv-install-missing +# applies to SuSe too +_grafana_dependencies: + - insserv-compat From 40d930c19191cb5a431e18d0cb6f509a26bc130b Mon Sep 17 00:00:00 2001 From: "U-VERWALTUNG\\krueger" Date: Sat, 27 Apr 2024 12:19:52 +0200 Subject: [PATCH 2/4] patch-grafana-installation-on-suse --- roles/grafana/tasks/install.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/roles/grafana/tasks/install.yml b/roles/grafana/tasks/install.yml index a8333321..1283420d 100644 --- a/roles/grafana/tasks/install.yml +++ b/roles/grafana/tasks/install.yml @@ -11,6 +11,27 @@ update_cache: true when: "(_grafana_dependencies | default())" +- name: "Prepare zypper" + when: + - "ansible_pkg_mgr == 'zypper'" + - "(grafana_manage_repo)" + environment: "{{ grafana_environment }}" + block: + - name: import Grafana RPM Key + ansible.builtin.rpm_key: + state: present + Key: "{{ grafana_yum_key }}" + + - name: "Add Grafana zypper repository" + community.general.zypper_repository: + name: grafana + description: grafana + repo: "{{ grafana_yum_repo }}" + enabled: true + disable_gpg_check : "{{ false if (grafana_yum_key) else omit }}" + runrefresh: true + when: "(not grafana_rhsm_repo)" + - name: "Prepare yum/dnf" when: - "ansible_pkg_mgr in ['yum', 'dnf']" From 0ec20918e007cd5482ffeb4ad222d80db3429c32 Mon Sep 17 00:00:00 2001 From: floerica Date: Sat, 27 Apr 2024 13:13:50 +0200 Subject: [PATCH 3/4] patch-grafana-installation-on-suse --- roles/grafana/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/grafana/tasks/install.yml b/roles/grafana/tasks/install.yml index 1283420d..123a72f5 100644 --- a/roles/grafana/tasks/install.yml +++ b/roles/grafana/tasks/install.yml @@ -20,7 +20,7 @@ - name: import Grafana RPM Key ansible.builtin.rpm_key: state: present - Key: "{{ grafana_yum_key }}" + key: "{{ grafana_yum_key }}" - name: "Add Grafana zypper repository" community.general.zypper_repository: From 7216f8b15ec2705791be7dd5ca82ee68f439932c Mon Sep 17 00:00:00 2001 From: floerica Date: Sat, 27 Apr 2024 13:48:16 +0200 Subject: [PATCH 4/4] patch-grafana-installation-on-suse --- roles/grafana/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/grafana/tasks/install.yml b/roles/grafana/tasks/install.yml index 123a72f5..6c32a4cd 100644 --- a/roles/grafana/tasks/install.yml +++ b/roles/grafana/tasks/install.yml @@ -29,7 +29,7 @@ repo: "{{ grafana_yum_repo }}" enabled: true disable_gpg_check : "{{ false if (grafana_yum_key) else omit }}" - runrefresh: true + runrefresh: true when: "(not grafana_rhsm_repo)" - name: "Prepare yum/dnf"