Skip to content

Commit

Permalink
Added ansible_connecion var to other tasks where it is necessarry
Browse files Browse the repository at this point in the history
  • Loading branch information
mwester117 committed Oct 29, 2024
1 parent e9b7a57 commit 98b0bae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions roles/install_agent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand All @@ -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
Expand All @@ -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"
Expand All @@ -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 }}"

0 comments on commit 98b0bae

Please sign in to comment.