Skip to content

Commit e01a548

Browse files
committed
install the standard monit - if 5.34, then bail out
1 parent 76c7405 commit e01a548

File tree

1 file changed

+17
-4
lines changed
  • tests/integration/targets/monit/tasks

1 file changed

+17
-4
lines changed

tests/integration/targets/monit/tasks/main.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,31 @@
2626
- /var/run/monit
2727
- "{{ process_root }}"
2828

29-
- name: install monit
29+
- name: Install monit
3030
become: true
3131
package:
3232
name: monit
3333
state: present
3434

35-
- include_vars: '{{ item }}'
35+
- include_vars: "{{ item }}"
3636
with_first_found:
3737
- files:
3838
- "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
39-
- '{{ ansible_os_family }}.yml'
40-
- 'defaults.yml'
39+
- "{{ ansible_os_family }}.yml"
40+
- "defaults.yml"
41+
42+
- name: Get monit version
43+
command: monit -V
44+
register: monit_version_output
45+
changed_when: false
46+
47+
- name: Check if monit version is buggy (5.34.x)
48+
set_fact:
49+
monit_version_is_buggy: "{{ monit_version_output.stdout | regex_search('This is Monit version 5\\.34\\.[0-9]+') is not none }}"
50+
51+
- name: Skip tests on buggy monit versions (5.34.x has known regression)
52+
meta: end_host
53+
when: monit_version_is_buggy
4154

4255
- name: monit config
4356
become: true

0 commit comments

Comments
 (0)