From 79ecc3dee1599eea972d669af7e3dbd464ffcf0e Mon Sep 17 00:00:00 2001 From: Quentin <59255702+quentin-rey@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:42:55 +0100 Subject: [PATCH] Add urlencode filter to potentially affected variables --- roles/install_agent/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/install_agent/tasks/main.yml b/roles/install_agent/tasks/main.yml index 6f6cd91..56a0d71 100644 --- a/roles/install_agent/tasks/main.yml +++ b/roles/install_agent/tasks/main.yml @@ -49,7 +49,7 @@ block: - name: "Get siteid" ansible.builtin.uri: - url: "{{ api_url }}sites?name={{ site }}&state=active" + url: "{{ api_url }}sites?name={{ site | urlencode }}&state=active" method: GET return_content: true headers: @@ -70,7 +70,7 @@ - name: "Get group id" ansible.builtin.uri: - url: "{{ api_url }}groups?name={{ group }}&siteIds={{ siteid }}" + url: "{{ api_url }}groups?name={{ group | urlencode }}&siteIds={{ siteid }}" method: GET return_content: true headers: @@ -125,7 +125,7 @@ - name: "Fail if new client does not appear in management console" ansible.builtin.uri: - url: "{{ api_url }}agents?siteIds={{ siteid }}&computerName={{ ansible_hostname }}&isActive=true" + url: "{{ api_url }}agents?siteIds={{ siteid }}&computerName={{ ansible_hostname | urlencode }}&isActive=true" method: GET return_content: true headers: