Skip to content
This repository was archived by the owner on Apr 15, 2023. It is now read-only.

Commit 4dddb35

Browse files
committed
enable monitoring only if requested, fix when definition
1 parent 9ebc5c2 commit 4dddb35

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The system needs access to the internet. Also, you will need an openSUSE Leap 15
5151
| `uyuni_defs_setup` | `false` | Flag whether errata for Debian should be generated via [DEFS](https://defs.steve-meier.de/) |
5252
| `uyuni_defs_setup_cronjob` | `false` | Flag whether DEFS cronjob should be generated |
5353
| `uyuni_cefs_path` | `/opt/errata-import` | Path to install CEFS and the wrapper script to |
54-
| `uyuni_channels`| *empty* | Common channels to synchronize (*e.g. ``centos7`` and ``epel7``*) |
54+
| `uyuni_channels`| *empty* | Common channels to synchronize (*e.g. `centos7` and `epel7`*) |
5555
| `uyuni_sync_channels` | `false` | Flag whether created channels should be synced |
5656
| `uyuni_bootstrap_repos` | `false` | Flag whether Salt bootstrap repositories should be created |
5757
| `uyuni_enable_monitoring` | `false` | Flag whether integrated monitoring stack should be enabled |

tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919

2020
- include_tasks: monitoring.yml
2121
tags: monitoring
22+
when: uyuni_enable_monitoring | bool

tasks/monitoring.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
zypper:
44
name: "{{ uyuni_monitoring_packages }}"
55
become: true
6-
when: uyuni_enable_monitoring
76

87
- name: Install monitoring Salt formulas
98
become: true
@@ -22,7 +21,7 @@
2221
command: mgr-monitoring-ctl enable
2322
# args:
2423
# creates: /usr/lib/systemd/system/tomcat.service.d/jmx.conf
25-
when: "'error' in monitoring_state.stdout|lower"
24+
when: "'error' in monitoring_state.stderr|lower"
2625
notify: Restart Uyuni
2726

2827
# TODO: enable monitoring in UI?

0 commit comments

Comments
 (0)