fix: Revert changes to use local_action 🐛
Some checks failed
CI / lint (push) Successful in 2m1s
CI / Molecule Test (almalinux8) (push) Failing after 13s
CI / Molecule Test (almalinux9) (push) Failing after 18s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped

This commit is contained in:
2025-02-21 21:35:36 +13:00
parent c5fe670e43
commit c29898b542
2 changed files with 21 additions and 21 deletions

View File

@@ -1,7 +1,6 @@
---
- name: Retrieve checkmk version
local_action:
module: uri
uri:
method: GET
headers:
Authorization: Bearer {{ cmk_username }} {{ cmk_secret }}
@@ -9,6 +8,7 @@
url: '{{ cmk_omd_protocol }}://{{ cmk_omd_host }}/{{ cmk_omd_site }}/check_mk/api/1.0/version'
return_content: true
register: cmk_output
- name: Set facts # noqa jinja[spacing]
set_fact:
cmk_major: "{{ cmk_output.json.versions.checkmk | regex_search('(?P<major>\\\
@@ -19,6 +19,7 @@
d+)\\.(?P<minor>\\d+).(?P<patch>[\\d\\w]+).(?P<edition>\\w+)', '\\g<patch>') | first }}"
cmk_edition: "{{ cmk_output.json.versions.checkmk | regex_search('(?P<major>\\\
d+)\\.(?P<minor>\\d+).(?P<patch>[\\d\\w]+).(?P<edition>\\w+)','\\g<edition>') | first }}"
- name: Output vars
debug:
var: '{{ item }}'