You've already forked ansible-role-checkmk-agent
fix: No longer delegate to localhost 🐛
This caused some issues when used in a delegated fashion.
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
---
|
||||
- name: Retrieve checkmk version
|
||||
uri:
|
||||
method: GET
|
||||
headers:
|
||||
Authorization: Bearer {{ cmk_username }} {{ cmk_secret }}
|
||||
Accept: application/json
|
||||
url: '{{ cmk_omd_protocol }}://{{ cmk_omd_host }}/{{ cmk_omd_site }}/check_mk/api/1.0/version'
|
||||
return_content: true
|
||||
register: cmk_output
|
||||
|
||||
- include_tasks: host-management/{{ ansible_os_family}}/check.yml
|
||||
|
||||
- name: Set facts # noqa jinja[spacing]
|
||||
set_fact:
|
||||
@@ -24,12 +17,14 @@
|
||||
debug:
|
||||
var: '{{ item }}'
|
||||
with_items: [cmk_major, cmk_minor, cmk_patch, cmk_edition]
|
||||
- include_tasks: host-management/legacy.yml
|
||||
|
||||
- include_tasks: host-management/{{ ansible_os_family}}/legacy.yml
|
||||
when: >
|
||||
cmk_add_host and
|
||||
(cmk_major | int <= 2 and
|
||||
cmk_minor | int < 2 or cmk_force_install)
|
||||
- include_tasks: host-management/modern.yml
|
||||
|
||||
- include_tasks: host-management/{{ ansible_os_family}}/modern.yml
|
||||
when: >-
|
||||
cmk_add_host and
|
||||
(cmk_major | int >= 2 and
|
||||
|
||||
Reference in New Issue
Block a user