aim-web2.1.0rc9
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
---
|
||||
|
||||
- name: Checkmk | Validate UniFi mode
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- checkmk_unifi_mode in ['auto','network','os','disabled']
|
||||
fail_msg: UniFi mode must be auto, network, os or disabled.
|
||||
quiet: true
|
||||
- name: Checkmk | Resolve UniFi mode
|
||||
ansible.builtin.set_fact:
|
||||
_checkmk_unifi_effective: '{{ checkmk_unifi_mode if checkmk_unifi_mode != ''auto'' else (''os'' if is_unifi_os_server
|
||||
| default(false) | bool else (''network'' if is_unifi_controller | default(false) | bool else ''disabled''))
|
||||
}}'
|
||||
- name: Checkmk | Build managed script plan
|
||||
ansible.builtin.set_fact:
|
||||
_checkmk_script_catalog: '{{ _checkmk_windows_catalog if ansible_facts.os_family == ''Windows'' else _checkmk_linux_catalog
|
||||
}}'
|
||||
- name: Checkmk | Resolve selected and obsolete checks
|
||||
ansible.builtin.set_fact:
|
||||
_checkmk_selected_scripts: '{{ _checkmk_script_catalog | selectattr(''enabled'') | list }}'
|
||||
_checkmk_obsolete_scripts: '{{ _checkmk_script_catalog | rejectattr(''enabled'') | list }}'
|
||||
- name: Checkmk | Selected check plan
|
||||
ansible.builtin.debug:
|
||||
msg:
|
||||
files: '{{ _checkmk_selected_scripts | map(attribute=''filename'') | list }}'
|
||||
unifi_mode: '{{ _checkmk_unifi_effective }}'
|
||||
when: aim_debug | default(false) | bool
|
||||
Reference in New Issue
Block a user