From 98b0bae12a40732deba16a9c8a707898f91fd8b3 Mon Sep 17 00:00:00 2001 From: Marco Wester <42421851+mwester117@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:45:12 +0100 Subject: [PATCH] Added ansible_connecion var to other tasks where it is necessarry --- roles/install_agent/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/install_agent/tasks/main.yml b/roles/install_agent/tasks/main.yml index e5703b8..437f6c7 100644 --- a/roles/install_agent/tasks/main.yml +++ b/roles/install_agent/tasks/main.yml @@ -66,6 +66,8 @@ until: ((siteobj.json.data.sites | length) > 0) and (siteobj.status == 200) retries: 3 delay: 20 + vars: + ansible_connection: local - name: "Extract siteid" ansible.builtin.set_fact: @@ -87,6 +89,8 @@ until: ((groupobj.json.data | length) > 0) and (groupobj.status == 200) retries: 3 delay: 20 + vars: + ansible_connection: local when: group is defined - name: "Extract groupid" @@ -110,6 +114,8 @@ status_code: 200 register: reg_token_obj delegate_to: localhost + vars: + ansible_connection: local no_log: "{{ hide_sensitive }}" until: reg_token_obj.status == 200 retries: 3 @@ -123,6 +129,8 @@ path: "{{ return_download_agent.original_message.full_path }}" state: absent delegate_to: localhost + vars: + ansible_connection: local when: not agent_installed - name: "Fail if new client does not appear in management console" @@ -140,4 +148,6 @@ no_log: "{{ hide_sensitive }}" until: ((registrationstatus.json.data | length) > 0) and (registrationstatus.status == 200) retries: "{{ check_console_retries }}" + vars: + ansible_connection: local delay: "{{ check_console_retry_delay }}"