Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1c57110
Merge pull request #1028 from Checkmk/devel
robin-checkmk Feb 24, 2026
bc7a723
Merge pull request #1030 from Checkmk/devel
robin-checkmk Feb 25, 2026
336c519
Merge pull request #1041 from Checkmk/devel
robin-checkmk Mar 11, 2026
5a75689
Merge pull request #1047 from Checkmk/devel
robin-checkmk Mar 11, 2026
544d668
Bump black from 26.3.0 to 26.3.1
dependabot[bot] Mar 12, 2026
451552a
Merge pull request #1049 from Checkmk/dependabot/pip/black-26.3.1
robin-checkmk Mar 13, 2026
4c1d3e3
Merge pull request #1051 from Checkmk/devel
robin-checkmk Mar 13, 2026
f7daa6b
Merge pull request #1053 from Checkmk/devel
robin-checkmk Mar 13, 2026
286414e
Merge pull request #1056 from Checkmk/devel
robin-checkmk Mar 20, 2026
ea847e1
Merge pull request #1063 from Checkmk/devel
robin-checkmk Apr 7, 2026
e708f57
Merge pull request #1064 from Checkmk/devel
robin-checkmk Apr 8, 2026
60c9d10
Merge pull request #1065 from Checkmk/devel
robin-checkmk Apr 9, 2026
60b9c2e
Merge pull request #1067 from Checkmk/devel
robin-checkmk Apr 9, 2026
3f13d71
Merge pull request #1069 from Checkmk/devel
robin-checkmk Apr 13, 2026
551bb7e
Merge pull request #1074 from Checkmk/devel
robin-checkmk Apr 13, 2026
115b2c0
Merge pull request #1078 from Checkmk/devel
robin-checkmk Apr 15, 2026
d70db1e
Merge pull request #1080 from Checkmk/devel
robin-checkmk Apr 15, 2026
cb1f81c
Merge pull request #1082 from Checkmk/devel
robin-checkmk Apr 24, 2026
bdbb5ee
Merge pull request #1084 from Checkmk/devel
robin-checkmk Apr 24, 2026
1875d0e
Merge pull request #1093 from Checkmk/devel
robin-checkmk May 18, 2026
4c4ea1c
Merge pull request #1097 from Checkmk/devel
robin-checkmk May 18, 2026
17ee279
Merge pull request #1107 from Checkmk/devel
robin-checkmk May 22, 2026
a6d0475
Merge pull request #1111 from Checkmk/devel
robin-checkmk May 22, 2026
21c3ebc
Merge pull request #1115 from Checkmk/devel
robin-checkmk Jun 10, 2026
1e7b2fe
Merge pull request #1116 from Checkmk/devel
robin-checkmk Jun 12, 2026
2cf3ce9
Merge pull request #1120 from Checkmk/devel
robin-checkmk Jun 12, 2026
0e4c184
Merge pull request #1123 from Checkmk/devel
robin-checkmk Jun 25, 2026
4258974
Merge pull request #1126 from Checkmk/devel
robin-checkmk Jun 25, 2026
5510686
Merge pull request #1129 from Checkmk/devel
robin-checkmk Jun 30, 2026
41d5d4f
Merge pull request #1132 from Checkmk/devel
robin-checkmk Jun 30, 2026
b2a2000
Merge pull request #1139 from Checkmk/devel
robin-checkmk Jul 14, 2026
f77e459
Merge pull request #1142 from Checkmk/devel
robin-checkmk Jul 14, 2026
59ce22b
Merge pull request #1146 from Checkmk/devel
robin-checkmk Jul 22, 2026
9952970
Merge pull request #1149 from Checkmk/devel
robin-checkmk Jul 22, 2026
dbc576f
Merge pull request #1155 from Checkmk/devel
robin-checkmk Jul 31, 2026
d85114d
Merge pull request #1159 from Checkmk/devel
robin-checkmk Jul 31, 2026
b9fd594
fix(agent): separate download and upload paths for agent package tran…
Aug 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roles/agent/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ checkmk_agent_configure_firewall: true

## Delegation
checkmk_agent_delegate_api_calls: 'localhost'
checkmk_agent_delegate_download: "{{ inventory_hostname }}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change. Can we somehow avoid it?
Coming back to this after reviewing further: I think we can avoid this, as the conditionals you introduced further down are unnecessary, if you keep this filed reserved for the hostname to delegate to.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is, that this configuration option leaves the impression one can randomly choose a delegate to have the files downloaded and then copied from to the target host.

This violates ansibles own assumption for the modules ansible.builtin.copy and ansible.windows.win_copy, whose expectations are that the file to copy has to reside either on the controller or on the target host.
One can only download files directly to the target host, or the controller, to then be able to copy the files to their destination.

So I don't think it would be good to leave the logic behind the delegation as is.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I see your point and I remember considering the option to actually delegate things to a third party host, so it can act as an intermediary. But I am still very hesitent to introduce such a breaking change. Especially, as the issue you describe has not surficed yet. I would rather extend on documentation, instead of an unnecessary breaking change.

@aewtemp aewtemp Aug 12, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fully understand your point.
But hear me out: Just because nobody has encountered the error yet, doesn't mean it's not there. And I am the first person then to have hit that problem.
I am targeting 1700+ hosts with this Playbook. Windows and Linux hosts. I tried delegating the operations for Windows hosts to a third (not controller nor target) Windows machine. It fails.

This is my approach to fix this misconception and the resulting error.

To me this wont break any setup already using this collection in their setups. Because they have not had this error yet.

There is no way this would be working if you choose a third host as delegate for the download and copy operation. Try it yourself.
Besides that Problem, if the controller is a Linux host, you only will be able to transfer files to Linux hosts. The current state does not work when cross-transferring files from Linux to Windows and vice versa.
This will also be fixed with my approach.

I'll fix and commit the outstanding things.

I would appreciate it if you could reconsider this once more.

checkmk_agent_delegate_download: true
checkmk_agent_delegate_registration: false
checkmk_agent_delegate_registration_target: "{{ inventory_hostname }}"

Expand Down
6 changes: 3 additions & 3 deletions roles/agent/tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install host-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
ansible.builtin.package:
deb: "{{ __checkmk_agent_agent.file.host }}"
deb: "{{ __checkmk_agent_agent.file.upload.host }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
when: |
Expand All @@ -14,7 +14,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install folder-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
ansible.builtin.package:
deb: "{{ __checkmk_agent_agent.file.pro }}"
deb: "{{ __checkmk_agent_agent.file.upload.pro }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
when: |
Expand All @@ -26,7 +26,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install Vanilla Agent."
become: true
ansible.builtin.package:
deb: "{{ __checkmk_agent_agent.file.community }}"
deb: "{{ __checkmk_agent_agent.file.upload.community }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
when: |
Expand Down
352 changes: 237 additions & 115 deletions roles/agent/tasks/Linux-files.yml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions roles/agent/tasks/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
tags:
- manage-host

- name: "Ensure registration readiness." # noqa no-handler
- name: "Ensure registration readiness." # noqa no-handler
Comment thread
aewtemp marked this conversation as resolved.
tags:
- always
block:
Expand Down Expand Up @@ -268,7 +268,7 @@
tags:
- register-agent

- name: "{{ ansible_facts['system'] }}: Initial push of data for push agent." # noqa no-changed-when
Comment thread
aewtemp marked this conversation as resolved.
- name: "{{ ansible_facts['system'] }}: Initial push of data for push agent." # noqa no-changed-when
become: true
ansible.builtin.command: cmk-agent-ctl push
when: checkmk_agent_mode == 'push'
Expand All @@ -280,8 +280,8 @@
path: "{{ item }}"
state: absent
loop:
- "{{ __checkmk_agent_agent.file.community }}"
- "{{ __checkmk_agent_agent.file.pro }}"
- "{{ __checkmk_agent_agent.file.host }}"
- "{{ __checkmk_agent_agent.file.upload.community }}"
- "{{ __checkmk_agent_agent.file.upload.pro }}"
- "{{ __checkmk_agent_agent.file.upload.host }}"
tags:
- download-package
6 changes: 3 additions & 3 deletions roles/agent/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install host-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
ansible.builtin.package:
name: "{{ __checkmk_agent_agent.file.host }}"
name: "{{ __checkmk_agent_agent.file.upload.host }}"
state: present
disable_gpg_check: true
when: |
Expand All @@ -14,7 +14,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install folder-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
ansible.builtin.package:
name: "{{ __checkmk_agent_agent.file.pro }}"
name: "{{ __checkmk_agent_agent.file.upload.pro }}"
state: present
disable_gpg_check: true
when: |
Expand All @@ -26,7 +26,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install Vanilla Agent."
become: true
ansible.builtin.package:
name: "{{ __checkmk_agent_agent.file.community }}"
name: "{{ __checkmk_agent_agent.file.upload.community }}"
state: present
disable_gpg_check: true
when: |
Expand Down
6 changes: 3 additions & 3 deletions roles/agent/tasks/Suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install host-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
community.general.zypper:
name: "{{ __checkmk_agent_agent.file.host }}"
name: "{{ __checkmk_agent_agent.file.upload.host }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
disable_gpg_check: true
Expand All @@ -15,7 +15,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install folder-specific {{ checkmk_agent_edition | upper }} Agent."
become: true
community.general.zypper:
name: "{{ __checkmk_agent_agent.file.pro }}"
name: "{{ __checkmk_agent_agent.file.upload.pro }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
disable_gpg_check: true
Expand All @@ -28,7 +28,7 @@
- name: "{{ ansible_facts['os_family'] }} Derivatives: Install Vanilla Agent."
become: true
community.general.zypper:
name: "{{ __checkmk_agent_agent.file.community }}"
name: "{{ __checkmk_agent_agent.file.upload.community }}"
force: "{{ checkmk_agent_force_install | bool }}"
state: present
disable_gpg_check: true
Expand Down
24 changes: 12 additions & 12 deletions roles/agent/tasks/Win32NT-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
os_type={{ __checkmk_agent_files_mapping[ansible_facts['os_family']] }}&\
agent_type=host_name"
validate_certs: "{{ checkmk_agent_server_validate_certs | bool }}"
dest: "{{ __checkmk_agent_agent.file.host }}"
dest: "{{ __checkmk_agent_agent.file.download.host }}"
method: GET
headers:
Authorization: "Bearer {{ checkmk_agent_user }} {{ __checkmk_agent_auth }}"
Expand All @@ -20,7 +20,7 @@
# This task may fail, as we fall back to the vanilla agent later
failed_when: false
changed_when: __checkmk_agent_host_download_state.status_code is defined and __checkmk_agent_host_download_state.status_code == 200
delegate_to: "{{ checkmk_agent_delegate_download }}"
delegate_to: "{{ 'localhost' if checkmk_agent_delegate_download else 'inventory_hostname' }}"
tags:
- download-package

Expand All @@ -39,7 +39,7 @@
folder_name={{ checkmk_agent_folder }}&\
agent_type=generic"
validate_certs: "{{ checkmk_agent_server_validate_certs | bool }}"
dest: "{{ __checkmk_agent_agent.file.pro }}"
dest: "{{ __checkmk_agent_agent.file.download.pro }}"
method: GET
headers:
Authorization: "Bearer {{ checkmk_agent_user }} {{ __checkmk_agent_auth }}"
Expand All @@ -56,7 +56,7 @@
# This task may fail, as we fall back to the vanilla agent later
failed_when: false
changed_when: __checkmk_agent_folder_download_state.status_code is defined and __checkmk_agent_folder_download_state.status_code == 200
delegate_to: "{{ checkmk_agent_delegate_download }}"
delegate_to: "{{ 'localhost' if checkmk_agent_delegate_download else 'inventory_hostname' }}"
tags:
- download-package

Expand All @@ -71,7 +71,7 @@
ansible.windows.win_get_url:
url: "{{ __checkmk_agent_agent.url.community }}"
validate_certs: "{{ checkmk_agent_server_validate_certs | bool }}"
dest: "{{ __checkmk_agent_agent.file.community }}"
dest: "{{ __checkmk_agent_agent.file.download.community }}"
timeout: "{{ checkmk_agent_download_timeout | default(omit) }}"
when: |
checkmk_agent_edition | lower == "community"
Expand All @@ -80,14 +80,14 @@
retries: 3
delay: 10
until: "not __checkmk_agent_vanilla_download_state.failed | bool"
delegate_to: "{{ checkmk_agent_delegate_download }}"
delegate_to: "{{ 'localhost' if checkmk_agent_delegate_download else 'inventory_hostname' }}"
tags:
- download-package

- name: "{{ ansible_facts['system'] }}: Transfer host-specific {{ checkmk_agent_edition | upper }} Agent."
ansible.windows.win_copy:
src: "{{ __checkmk_agent_agent.file.host }}"
dest: "{{ __checkmk_agent_agent.file.host }}"
src: "{{ __checkmk_agent_agent.file.download.host }}"
dest: "{{ __checkmk_agent_agent.file.upload.host }}"
when: |
checkmk_agent_edition | lower != "community"
and checkmk_agent_host_specific | bool
Expand All @@ -97,8 +97,8 @@

- name: "{{ ansible_facts['system'] }}: Transfer folder-specific {{ checkmk_agent_edition | upper }} Agent."
ansible.windows.win_copy:
src: "{{ __checkmk_agent_agent.file.pro }}"
dest: "{{ __checkmk_agent_agent.file.pro }}"
src: "{{ __checkmk_agent_agent.file.download.pro }}"
dest: "{{ __checkmk_agent_agent.file.upload.pro }}"
when: |
checkmk_agent_edition | lower != "community"
and checkmk_agent_folder_specific | bool
Expand All @@ -108,8 +108,8 @@

- name: "{{ ansible_facts['system'] }}: Transfer Vanilla {{ checkmk_agent_edition | upper }} Agent."
ansible.windows.win_copy:
src: "{{ __checkmk_agent_agent.file.community }}"
dest: "{{ __checkmk_agent_agent.file.community }}"
src: "{{ __checkmk_agent_agent.file.download.community }}"
dest: "{{ __checkmk_agent_agent.file.upload.community }}"
when: |
checkmk_agent_delegate_download != inventory_hostname
and (checkmk_agent_edition | lower == "community"
Expand Down
12 changes: 6 additions & 6 deletions roles/agent/tasks/Windows.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: "{{ ansible_facts['os_family'] }}: Install host-specific {{ checkmk_agent_edition | upper }} Agent."
ansible.windows.win_package:
path: "{{ __checkmk_agent_agent.file.host }}"
path: "{{ __checkmk_agent_agent.file.upload.host }}"
state: present
when: |
checkmk_agent_edition | lower != "community"
Expand All @@ -11,7 +11,7 @@

- name: "{{ ansible_facts['os_family'] }}: Install folder-specific {{ checkmk_agent_edition | upper }} Agent."
ansible.windows.win_package:
path: "{{ __checkmk_agent_agent.file.pro }}"
path: "{{ __checkmk_agent_agent.file.upload.pro }}"
state: present
when: |
checkmk_agent_edition | lower != "community"
Expand All @@ -21,7 +21,7 @@

- name: "{{ ansible_facts['os_family'] }}: Install Vanilla Agent."
ansible.windows.win_package:
path: "{{ __checkmk_agent_agent.file.community }}"
path: "{{ __checkmk_agent_agent.file.upload.community }}"
state: present
when: |
checkmk_agent_edition | lower == "community"
Expand All @@ -34,8 +34,8 @@
path: "{{ item }}"
state: absent
loop:
- "{{ __checkmk_agent_agent.file.community }}"
- "{{ __checkmk_agent_agent.file.pro }}"
- "{{ __checkmk_agent_agent.file.host }}"
- "{{ __checkmk_agent_agent.file.upload.community }}"
- "{{ __checkmk_agent_agent.file.upload.pro }}"
- "{{ __checkmk_agent_agent.file.upload.host }}"
tags:
- download-package
26 changes: 24 additions & 2 deletions roles/agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,30 @@
- install-package
- download-package

- name: "{{ ansible_facts['system'] }}: Include agent package download tasks."
ansible.builtin.include_tasks: "{{ ansible_facts['system'] }}-files.yml"
- name: "Preflight - Make sure facts for the delegate Host (Controller or Target Host) are present."
ansible.builtin.setup:
delegate_to: "{{ 'localhost' if checkmk_agent_delegate_download else inventory_hostname }}"
delegate_facts: true
tags:
- download-package

- name: "Preflight - Set facts for the delegate Host (Controller or target Host)"
ansible.builtin.set_fact:
__checkmk_agent_delegate_is_windows: >-
{{ hostvars['localhost']['ansible_facts']['os_family'] == 'Windows' }}
tags:
- download-package

- name: "{{ ansible_facts['system'] }}: Include agent package download tasks (Linux)."
ansible.builtin.include_tasks: "Linux-files.yml"
when: not __checkmk_agent_delegate_is_windows
tags:
- include-system-tasks
- download-package

- name: "{{ ansible_facts['system'] }}: Include agent package download tasks (Windows)."
ansible.builtin.include_tasks: "Win32NT-files.yml"
when: __checkmk_agent_delegate_is_windows
Comment on lines +30 to +53

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? This feels awefully complex and seems to do the same as the original code.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just came to notice that I left the original inclusion of os_family specific variables above this block.
I'll check if it works without explicitly loading the needed variables for the controller host.

tags:
- include-system-tasks
- download-package
Expand Down
13 changes: 9 additions & 4 deletions roles/agent/vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
__checkmk_agent_host_tmp_dir: "/tmp"
__checkmk_agent_lin_tmp_dir: "/tmp"

__checkmk_agent_agent:
url:
community: "{{ __checkmk_agent_site_url }}/check_mk/agents/check-mk-agent_{{ checkmk_agent_version }}-1_all.deb"
pro: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke"
file:
community: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-vanilla.deb"
pro: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-generic.deb"
host: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.deb"
download:
community: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent_{{ checkmk_agent_version }}-vanilla.deb"
pro: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent_{{ checkmk_agent_version }}-generic.deb"
host: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.deb"
upload:
community: "{{ __checkmk_agent_lin_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-vanilla.deb"
pro: "{{ __checkmk_agent_lin_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-generic.deb"
host: "{{ __checkmk_agent_lin_tmp_dir }}/check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.deb"
13 changes: 9 additions & 4 deletions roles/agent/vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
__checkmk_agent_host_tmp_dir: "/tmp"
__checkmk_agent_lin_tmp_dir: "/tmp"

__checkmk_agent_agent:
url:
community: "{{ __checkmk_agent_site_url }}/check_mk/agents/check-mk-agent-{{ checkmk_agent_version }}-1.noarch.rpm"
pro: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke"
file:
community: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm"
pro: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm"
host: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm"
download:
community: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm"
pro: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm"
host: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm"
upload:
community: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm"
pro: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm"
host: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm"
13 changes: 9 additions & 4 deletions roles/agent/vars/Suse.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
__checkmk_agent_host_tmp_dir: "/tmp"
__checkmk_agent_lin_tmp_dir: "/tmp"

__checkmk_agent_agent:
url:
community: "{{ __checkmk_agent_site_url }}/check_mk/agents/check-mk-agent-{{ checkmk_agent_version }}-1.noarch.rpm"
pro: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke"
file:
community: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm"
pro: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm"
host: "{{ __checkmk_agent_host_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm"
download:
community: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm"
pro: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm"
host: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm"
upload:
community: "{{ __checkmk_agent_lin_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-vanilla.rpm"
pro: "{{ __checkmk_agent_lin_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-generic.rpm"
host: "{{ __checkmk_agent_lin_tmp_dir }}/check-mk-agent-{{ checkmk_agent_version }}-1.noarch-{{ inventory_hostname }}.rpm"
13 changes: 9 additions & 4 deletions roles/agent/vars/Windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
__checkmk_agent_host_tmp_dir: "C:\\Windows\\Temp"
__checkmk_agent_win_tmp_dir: "C:\\Windows\\Temp"
__checkmk_agent_controller_binary_path: "C:\\Program Files (x86)\\checkmk\\service\\cmk-agent-ctl.exe"
__checkmk_agent_binary_path: "C:\\Program Files (x86)\\checkmk\\service\\check_mk_agent.exe"

Expand All @@ -8,6 +8,11 @@ __checkmk_agent_agent:
community: "{{ __checkmk_agent_site_url }}/check_mk/agents/windows/check_mk_agent.msi"
pro: "{{ __checkmk_agent_site_url }}/check_mk/api/1.0/domain-types/agent/actions/download_by_host/invoke"
file:
community: "{{ __checkmk_agent_host_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}.msi"
pro: "{{ __checkmk_agent_host_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}.msi"
host: "{{ __checkmk_agent_host_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.msi"
download:
community: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent_{{ checkmk_agent_version }}.msi"
pro: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent_{{ checkmk_agent_version }}.msi"
host: "{{ __checkmk_agent_host_tmp_dir }}check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.msi"
upload:
community: "{{ __checkmk_agent_win_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}.msi"
pro: "{{ __checkmk_agent_win_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}.msi"
host: "{{ __checkmk_agent_win_tmp_dir }}\\check-mk-agent_{{ checkmk_agent_version }}-{{ inventory_hostname }}.msi"
4 changes: 4 additions & 0 deletions roles/agent/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@
RedHat: linux_rpm
Suse: linux_rpm
Windows: windows_msi

# Temporary directory to download the agent to (Win-Path if controller runs on Windows, Lin-Path if controller runs on Linux)
# Hast to include the suffix directory delimiter (Win = \\, Lin = /)
__checkmk_agent_host_tmp_dir: "/tmp/"

Check failure on line 43 in roles/agent/vars/main.yml

View workflow job for this annotation

GitHub Actions / Ansible (Ⓐstable-2.16)

yaml[new-line-at-end-of-file]

No new line character at the end of file

Check failure on line 43 in roles/agent/vars/main.yml

View workflow job for this annotation

GitHub Actions / Ansible (Ⓐdevel)

yaml[new-line-at-end-of-file]

No new line character at the end of file

Check failure on line 43 in roles/agent/vars/main.yml

View workflow job for this annotation

GitHub Actions / Ansible (Ⓐstable-2.19)

yaml[new-line-at-end-of-file]

No new line character at the end of file

Check failure on line 43 in roles/agent/vars/main.yml

View workflow job for this annotation

GitHub Actions / Ansible (Ⓐstable-2.21)

yaml[new-line-at-end-of-file]

No new line character at the end of file

Check failure on line 43 in roles/agent/vars/main.yml

View workflow job for this annotation

GitHub Actions / Ansible (Ⓐstable-2.20)

yaml[new-line-at-end-of-file]

No new line character at the end of file
Comment thread
aewtemp marked this conversation as resolved.
Loading