checkmk_deploy_agent/tasks/Windows.yml

40 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2025-12-01 11:50:37 +01:00
---
- name: "{{ ansible_os_family }}: Install host-specific {{ checkmk_agent_edition | upper }} Agent."
ansible.windows.win_package:
path: "{{ __checkmk_agent_agent.file.host }}"
state: present
when: |
checkmk_agent_edition | lower != "cre"
and checkmk_agent_host_specific | bool
tags:
- install-package
- name: "{{ ansible_os_family }}: Install GENERIC or folder-specific {{ checkmk_agent_edition | upper }} Agent."
ansible.windows.win_package:
path: "{{ __checkmk_agent_agent.file.cee }}"
state: present
when: |
checkmk_agent_edition | lower != "cre"
and not checkmk_agent_host_specific | bool
tags:
- install-package
- name: "{{ ansible_os_family }}: Install Vanilla agent."
ansible.windows.win_package:
path: "{{ __checkmk_agent_agent.file.cre }}"
state: present
when: checkmk_agent_edition | lower == "cre"
tags:
- install-package
- name: "Cleanup Checkmk Agent Setups."
ansible.windows.win_file:
path: "{{ item }}"
state: absent
loop:
- "{{ __checkmk_agent_agent.file.cre }}"
- "{{ __checkmk_agent_agent.file.cee }}"
- "{{ __checkmk_agent_agent.file.host }}"
tags:
- download-package