Skip to content

Commit

Permalink
templates/packer: set http(s)_proxy environment variable in unit
Browse files Browse the repository at this point in the history
  • Loading branch information
croissanne committed Apr 10, 2024
1 parent 00ebf7c commit 484c82c
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
[Service]
Environment="http_proxy=$http_proxy"
Environment="https_proxy=$https_proxy"
EOF
fi

# Prepare osbuild-composer's remote worker services and sockets.
systemctl enable --now "osbuild-remote-worker@${COMPOSER_HOST}:${COMPOSER_PORT}"

0 comments on commit 484c82c

Please sign in to comment.