From 484c82ce55a373e6a3dd17b5133209e50bbff8b6 Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Mon, 8 Apr 2024 16:47:50 +0200 Subject: [PATCH] templates/packer: set http(s)_proxy environment variable in unit --- .../worker-initialization-scripts/worker_service.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/templates/packer/ansible/roles/common/files/worker-initialization-scripts/worker_service.sh b/templates/packer/ansible/roles/common/files/worker-initialization-scripts/worker_service.sh index 9c04486da..a0d238340 100755 --- a/templates/packer/ansible/roles/common/files/worker-initialization-scripts/worker_service.sh +++ b/templates/packer/ansible/roles/common/files/worker-initialization-scripts/worker_service.sh @@ -4,5 +4,16 @@ source /tmp/cloud_init_vars echo "Starting worker service." +http_proxy=${http_proxy:-} +https_proxy=${https_proxy:-} +if [ -n "$http_proxy" ] || [ -n "$https_proxy" ]; then + sudo mkdir /etc/systemd/system/osbuild-remote-worker@.service.d/ + sudo tee -a /etc/systemd/system/osbuild-remote-worker@.service.d/override.conf <