diff --git a/roles/agent/defaults/main.yml b/roles/agent/defaults/main.yml index a39a9e605..e82f3fbaf 100644 --- a/roles/agent/defaults/main.yml +++ b/roles/agent/defaults/main.yml @@ -4,6 +4,7 @@ checkmk_agent_edition: cre checkmk_agent_server_protocol: http checkmk_agent_server: localhost checkmk_agent_site: mysite +checkmk_agent_registration_server_protocol: "{{ checkmk_agent_server_protocol }}" checkmk_agent_registration_server: "{{ checkmk_agent_server }}" checkmk_agent_registration_site: "{{ checkmk_agent_site }}" checkmk_agent_server_validate_certs: 'true' diff --git a/roles/agent/molecule/2.1.0/group_vars/all.yml b/roles/agent/molecule/2.1.0/group_vars/all.yml index 98bf3d455..0112736d4 100644 --- a/roles/agent/molecule/2.1.0/group_vars/all.yml +++ b/roles/agent/molecule/2.1.0/group_vars/all.yml @@ -12,6 +12,7 @@ checkmk_agent_edition: "{{ checkmk_var_edition }}" checkmk_agent_server_protocol: http checkmk_agent_server: 127.0.0.1 checkmk_agent_site: "{{ checkmk_var_checkmk_site }}" +checkmk_agent_registration_server_protocol: "{{ checkmk_agent_server_protocol }}" checkmk_agent_registration_server: "{{ checkmk_agent_server }}" checkmk_agent_registration_site: "{{ checkmk_agent_site }}" checkmk_agent_server_validate_certs: 'false' diff --git a/roles/agent/molecule/2.2.0/group_vars/all.yml b/roles/agent/molecule/2.2.0/group_vars/all.yml index 81d3f7f09..63daf8788 100644 --- a/roles/agent/molecule/2.2.0/group_vars/all.yml +++ b/roles/agent/molecule/2.2.0/group_vars/all.yml @@ -12,6 +12,7 @@ checkmk_agent_edition: "{{ checkmk_var_edition }}" checkmk_agent_server_protocol: http checkmk_agent_server: 127.0.0.1 checkmk_agent_site: "{{ checkmk_var_checkmk_site }}" +checkmk_agent_registration_server_protocol: "{{ checkmk_agent_server_protocol }}" checkmk_agent_registration_server: "{{ checkmk_agent_server }}" checkmk_agent_registration_site: "{{ checkmk_agent_site }}" checkmk_agent_server_validate_certs: 'false' diff --git a/roles/agent/molecule/2.3.0/group_vars/all.yml b/roles/agent/molecule/2.3.0/group_vars/all.yml index 77ff0e1ee..395449edd 100644 --- a/roles/agent/molecule/2.3.0/group_vars/all.yml +++ b/roles/agent/molecule/2.3.0/group_vars/all.yml @@ -12,6 +12,7 @@ checkmk_agent_edition: "{{ checkmk_var_edition }}" checkmk_agent_server_protocol: http checkmk_agent_server: 127.0.0.1 checkmk_agent_site: "{{ checkmk_var_checkmk_site }}" +checkmk_agent_registration_server_protocol: "{{ checkmk_agent_server_protocol }}" checkmk_agent_registration_server: "{{ checkmk_agent_server }}" checkmk_agent_registration_site: "{{ checkmk_agent_site }}" checkmk_agent_server_validate_certs: 'false' diff --git a/roles/agent/tasks/Linux.yml b/roles/agent/tasks/Linux.yml index 6ddc18fd9..f64ac6ca1 100644 --- a/roles/agent/tasks/Linux.yml +++ b/roles/agent/tasks/Linux.yml @@ -106,7 +106,7 @@ become: true ansible.builtin.shell: | cmk-update-agent register -H {{ checkmk_agent_host_name }} \ - -s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_server_protocol }} \ + -s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_registration_server_protocol }} \ -U {{ checkmk_agent_user }} -P {{ __checkmk_agent_auth }} no_log: "{{ checkmk_agent_no_log | bool }}" register: __checkmk_agent_update_state @@ -122,7 +122,7 @@ become: true ansible.builtin.shell: | cmk-update-agent register -H {{ checkmk_agent_host_name }} \ - -s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_server_protocol }} \ + -s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_registration_server_protocol }} \ -U {{ checkmk_agent_user }} -S {{ __checkmk_agent_auth }} no_log: "{{ checkmk_agent_no_log | bool }}" register: __checkmk_agent_update_state diff --git a/roles/agent/tasks/Win32NT.yml b/roles/agent/tasks/Win32NT.yml index 5cbe3eb95..189fa8766 100644 --- a/roles/agent/tasks/Win32NT.yml +++ b/roles/agent/tasks/Win32NT.yml @@ -74,7 +74,7 @@ - name: "{{ ansible_system }}: Register Agent for automatic Updates using Automation Secret." # noqa no-changed-when ansible.windows.win_command: | check_mk_agent.exe updater register -H {{ checkmk_agent_host_name }} \ - -s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_server_protocol }} \ + -s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_registration_server_protocol }} \ -U {{ checkmk_agent_user }} -S {{ __checkmk_agent_auth }} no_log: "{{ checkmk_agent_no_log | bool }}" register: __checkmk_agent_update_state