From 3f36452e6fd37b7ff403ef34b522091739bf1d74 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sun, 14 Jan 2024 10:13:36 +0100 Subject: [PATCH] add proxy for go with variable --- roles/golang/defaults/main.yml | 1 + roles/golang/tasks/setup.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/roles/golang/defaults/main.yml b/roles/golang/defaults/main.yml index 1a918d8..921f843 100755 --- a/roles/golang/defaults/main.yml +++ b/roles/golang/defaults/main.yml @@ -13,6 +13,7 @@ golang_arch: amd64 golang_mirror: 'https://dl.google.com/go' golang_mirror_validate_certs: true +golang_mirror_use_proxy: true # Base installation directory the Go language SDK distribution golang_install_dir: '/usr/local/go' diff --git a/roles/golang/tasks/setup.yml b/roles/golang/tasks/setup.yml index dcbe5f7..90a2b1c 100644 --- a/roles/golang/tasks/setup.yml +++ b/roles/golang/tasks/setup.yml @@ -56,6 +56,7 @@ mode: 0644 checksum: "{{ 'sha256:' + golang_sha256_checksum | default(omit) }}" force: false + use_proxy: '{{ golang_mirror_use_proxy }}' validate_certs: '{{ golang_mirror_validate_certs }}' when: not golang_file_exists.stat.exists