rescue block for agent installation

This commit is contained in:
abrown38 committed 2025-05-22 11:29:03 +01:00
1 parent 1423931249
commit 882676ee04
1 file changed
+18 -16
+18 -16
View File
@@ -123,25 +123,27 @@
block: block:
- name: Gather Facts - name: Gather Facts
setup: setup:
tags: tags: checkmk_agent
- checkmk_all
- checkmk_agent
- name: Install CheckMK agent on VMs - name: Install CheckMK agent on VMs
import_role: import_role:
name: agent name: agent
tags: tags: checkmk_agent
- checkmk_all
- checkmk_agent
- name: TLS registrtion rescue:
block: - name: restart agent service
- name: register for TLS win_shell: |
win_shell: | powershell Restart-Service -Name CheckmkService
sl 'C:\Program Files (x86)\checkmk\service' tags: always
.\cmk-agent-ctl register --hostname {{ inventory_hostname }} --server {{ checkmk_server }} --site {{ checkmk_agent_site }} --user {{ checkmk_agent_user }} --password '{{ checkmk_password }}' --trust-cert
tags:
- checkmk_host
- checkmk_tls
- checkmk_all
- name: Retry agent installation
import_role:
name: agent
tags: always
always:
- name: register for TLS
win_shell: |
sl 'C:\Program Files (x86)\checkmk\service'
.\cmk-agent-ctl register --hostname {{ inventory_hostname }} --server {{ checkmk_server }} --site {{ checkmk_agent_site }} --user {{ checkmk_agent_user }} --password '{{ checkmk_password }}' --trust-cert
tags: [checkmk_all, checkmk_agent, checkmk_tls]