From 00ca2d21332e7ea3243476f3450e138f6bc2f230 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Mon, 22 Apr 2024 15:32:36 +0800 Subject: [PATCH] URL fixes if using unix_socket - according to https://github.com/ansible/ansible/pull/43560 where unix_socket was implemented, you're supposed to use http://localhost/ as hostname when using unix_socket --- collection/plugins/modules/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collection/plugins/modules/device.py b/collection/plugins/modules/device.py index 865fd44..964ebe9 100644 --- a/collection/plugins/modules/device.py +++ b/collection/plugins/modules/device.py @@ -97,7 +97,7 @@ else: def make_headers(host, api_key, unix_socket=None, device=None): url = '{}{}{}{}'.format( - host if not unix_socket else "", + host, SYNCTHING_API_URI, '/' if device else '', device if device else '')