File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -156,6 +156,29 @@ elif [[ $GOARCH == "x86_64" ]]; then
156156 GOARCH=" amd64"
157157fi
158158
159+ VERSION=" go${GO_VERSION} "
160+ OS=" linux"
161+
162+ GO_CHECKSUM=" $(
163+ curl -s " https://go.dev/dl/?mode=json&include=all" | jq -r \
164+ --arg version " $VERSION " \
165+ --arg os " $OS " \
166+ --arg arch " $GOARCH " \
167+ '
168+ .[]
169+ | select(.version == $version)
170+ | .files[]
171+ | select(.os == $os and .arch == $arch)
172+ | .sha256
173+ '
174+ ) "
175+
176+ if [ -z " $GO_CHECKSUM " ]; then
177+ echo " Error: Could not find checksum for $VERSION ($OS /$ARCH )" >&2
178+ else
179+ echo " Checksum: $GO_CHECKSUM "
180+ fi
181+
159182# Also need the 3.9 version of netaddr for ansible.netcommon
160183# and lxml for the pyxpath script
161184sudo python -m pip install netaddr lxml
@@ -172,6 +195,7 @@ ANSIBLE_FORCE_COLOR=true ansible-playbook \
172195 -e " virthost=$HOSTNAME " \
173196 -e " go_version=$GO_VERSION " \
174197 -e " go_custom_mirror=$GO_CUSTOM_MIRROR " \
198+ -e " go_checksum=$GO_CHECKSUM " \
175199 -e " GOARCH=$GOARCH " \
176200 $ALMA_PYTHON_OVERRIDE \
177201 -i vm-setup/inventory.ini \
You can’t perform that action at this time.
0 commit comments