From 86cacbdf71c8c5fe7977c58a2e8bcb909a9b6dc9 Mon Sep 17 00:00:00 2001 From: ScriptAutomate Date: Mon, 25 Mar 2024 16:38:43 -0500 Subject: [PATCH] Upgrade to Salt 3006.8 for all provisioning --- golden-state-tree/os/windows/pkgs/python3.sls | 4 ++-- golden-state-tree/python-pkgs/pyyaml.sls | 2 +- os-images/AWS/almalinux/almalinux.pkr.hcl | 2 +- os-images/AWS/amazonlinux/amazonlinux.pkr.hcl | 2 +- os-images/AWS/amazonlinux2000/amazonlinux2000.pkr.hcl | 2 +- os-images/AWS/archlinux/archlinux.pkr.hcl | 2 +- os-images/AWS/centos/centos.pkr.hcl | 2 +- os-images/AWS/debian/debian.pkr.hcl | 2 +- os-images/AWS/fedora/fedora.pkr.hcl | 2 +- os-images/AWS/opensuse/opensuse.pkr.hcl | 2 +- os-images/AWS/photon/photon.pkr.hcl | 4 ++-- os-images/AWS/rockylinux/rockylinux.pkr.hcl | 2 +- os-images/AWS/ubuntu/ubuntu.pkr.hcl | 2 +- os-images/AWS/windows/scripts/Provision-Salt.ps1 | 2 +- os-images/AWS/windows/windows.pkr.hcl | 2 +- os-images/files/provision-salt.sh | 11 +++++++++-- 16 files changed, 26 insertions(+), 19 deletions(-) diff --git a/golden-state-tree/os/windows/pkgs/python3.sls b/golden-state-tree/os/windows/pkgs/python3.sls index 86bdba07d..db42f9b21 100644 --- a/golden-state-tree/os/windows/pkgs/python3.sls +++ b/golden-state-tree/os/windows/pkgs/python3.sls @@ -1,7 +1,7 @@ -{%- set python3_dir = 'c:\\\\Python38' %} +{%- set python3_dir = 'c:\\\\Python310' %} python3: pkg.installed: - name: python3_x64 - - version: '3.8.10150.0' + - version: '3.10.4150.0' - extra_install_flags: "TargetDir={{ python3_dir }} Include_doc=0 Include_tcltk=0 Include_test=0 Include_launcher=1 PrependPath=1 Shortcuts=0" diff --git a/golden-state-tree/python-pkgs/pyyaml.sls b/golden-state-tree/python-pkgs/pyyaml.sls index c69d9fecf..c56db35b9 100644 --- a/golden-state-tree/python-pkgs/pyyaml.sls +++ b/golden-state-tree/python-pkgs/pyyaml.sls @@ -8,7 +8,7 @@ pyyaml: cmd.run: - - name: {{ pip }} install pyyaml==5.4.1 + - name: {{ pip }} install pyyaml==6.0.1 - unless: {%- if grains['os_family'] == 'Windows' %} - py -3 -c "import yaml" diff --git a/os-images/AWS/almalinux/almalinux.pkr.hcl b/os-images/AWS/almalinux/almalinux.pkr.hcl index 89e5d012b..0e079eaa4 100644 --- a/os-images/AWS/almalinux/almalinux.pkr.hcl +++ b/os-images/AWS/almalinux/almalinux.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3005.1+2103.gc1fc63d39a" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/amazonlinux/amazonlinux.pkr.hcl b/os-images/AWS/amazonlinux/amazonlinux.pkr.hcl index 8d95f6c33..a3e1b5dd7 100644 --- a/os-images/AWS/amazonlinux/amazonlinux.pkr.hcl +++ b/os-images/AWS/amazonlinux/amazonlinux.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3005.1+2103.gc1fc63d39a" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/amazonlinux2000/amazonlinux2000.pkr.hcl b/os-images/AWS/amazonlinux2000/amazonlinux2000.pkr.hcl index eaba45b3f..b2fefe17c 100644 --- a/os-images/AWS/amazonlinux2000/amazonlinux2000.pkr.hcl +++ b/os-images/AWS/amazonlinux2000/amazonlinux2000.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.2" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/archlinux/archlinux.pkr.hcl b/os-images/AWS/archlinux/archlinux.pkr.hcl index d000a3338..2d4a62945 100644 --- a/os-images/AWS/archlinux/archlinux.pkr.hcl +++ b/os-images/AWS/archlinux/archlinux.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.2" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/centos/centos.pkr.hcl b/os-images/AWS/centos/centos.pkr.hcl index bebd263ec..e9b613a3a 100644 --- a/os-images/AWS/centos/centos.pkr.hcl +++ b/os-images/AWS/centos/centos.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/debian/debian.pkr.hcl b/os-images/AWS/debian/debian.pkr.hcl index ec2b05456..b92390fa2 100644 --- a/os-images/AWS/debian/debian.pkr.hcl +++ b/os-images/AWS/debian/debian.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/fedora/fedora.pkr.hcl b/os-images/AWS/fedora/fedora.pkr.hcl index 3514bb750..323539ee9 100644 --- a/os-images/AWS/fedora/fedora.pkr.hcl +++ b/os-images/AWS/fedora/fedora.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/opensuse/opensuse.pkr.hcl b/os-images/AWS/opensuse/opensuse.pkr.hcl index d5c20e0c3..ac09090f2 100644 --- a/os-images/AWS/opensuse/opensuse.pkr.hcl +++ b/os-images/AWS/opensuse/opensuse.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/photon/photon.pkr.hcl b/os-images/AWS/photon/photon.pkr.hcl index 640cb0993..61c27f9cd 100644 --- a/os-images/AWS/photon/photon.pkr.hcl +++ b/os-images/AWS/photon/photon.pkr.hcl @@ -68,7 +68,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { @@ -184,7 +184,7 @@ build { inline = [ "systemctl mask tmp.mount", "find /etc/yum.repos.d -type f -exec sed -i 's!dl.bintray.com/vmware!packages.vmware.com/photon/$releasever!' {} ';'", - "tdnf update -y", + "if [ ${var.distro_version} == '4' ]; then tdnf update -y photon-repos-4.0-3.ph4 --enablerepo=photon --refresh ; else tdnf update -y; fi", ] inline_shebang = "/bin/sh -ex" } diff --git a/os-images/AWS/rockylinux/rockylinux.pkr.hcl b/os-images/AWS/rockylinux/rockylinux.pkr.hcl index 41ad7b979..016256a8b 100644 --- a/os-images/AWS/rockylinux/rockylinux.pkr.hcl +++ b/os-images/AWS/rockylinux/rockylinux.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/ubuntu/ubuntu.pkr.hcl b/os-images/AWS/ubuntu/ubuntu.pkr.hcl index 76e315747..f621e0902 100644 --- a/os-images/AWS/ubuntu/ubuntu.pkr.hcl +++ b/os-images/AWS/ubuntu/ubuntu.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/AWS/windows/scripts/Provision-Salt.ps1 b/os-images/AWS/windows/scripts/Provision-Salt.ps1 index 617a97edf..92fd47fb6 100644 --- a/os-images/AWS/windows/scripts/Provision-Salt.ps1 +++ b/os-images/AWS/windows/scripts/Provision-Salt.ps1 @@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $SALT_ARCHIVE_NAME="salt-$Env:SALT_VERSION-onedir-windows-$Env:OS_ARCH.zip" -$SALT_DOWNLOAD_URL="http://salt-onedir-golden-images-provision.s3-website-us-west-2.amazonaws.com/$SALT_ARCHIVE_NAME" +$SALT_DOWNLOAD_URL="https://repo.saltproject.io/salt/py3/onedir/minor/$Env:SALT_VERSION/$SALT_ARCHIVE_NAME" $DST = "$Env:TEMP\$SALT_ARCHIVE_NAME" Write-Host "`nDownloading $SALT_DOWNLOAD_URL ..." -ForegroundColor Yellow $wc = New-Object System.Net.WebClient diff --git a/os-images/AWS/windows/windows.pkr.hcl b/os-images/AWS/windows/windows.pkr.hcl index b4d3aeca8..2e711038e 100644 --- a/os-images/AWS/windows/windows.pkr.hcl +++ b/os-images/AWS/windows/windows.pkr.hcl @@ -66,7 +66,7 @@ variable "salt_provision_type" { variable "salt_provision_version" { type = string - default = "3006.0" + default = "3006.8" } variable "salt_provision_root_dir" { diff --git a/os-images/files/provision-salt.sh b/os-images/files/provision-salt.sh index ce3264133..09758b3e9 100755 --- a/os-images/files/provision-salt.sh +++ b/os-images/files/provision-salt.sh @@ -11,8 +11,15 @@ else PLATFORM="macos" fi -SALT_ARCHIVE_NAME="salt-${SALT_VERSION}-onedir-${PLATFORM}-${OS_ARCH}.tar.xz" -SALT_DOWNLOAD_URL="http://salt-onedir-golden-images-provision.s3-website-us-west-2.amazonaws.com/${SALT_ARCHIVE_NAME}" +if [ "${OS_ARCH}" = "aarch64" ]; then + SALT_ARCH="arm64" +else + SALT_ARCH="${OS_ARCH}" +fi + +# SALT_MAJOR_VERSION=$(echo "${SALT_VERSION}" | cut -f1 -d'.') +SALT_ARCHIVE_NAME="salt-${SALT_VERSION}-onedir-${PLATFORM}-${SALT_ARCH}.tar.xz" +SALT_DOWNLOAD_URL="https://repo.saltproject.io/salt/py3/onedir/minor/${SALT_VERSION}/${SALT_ARCHIVE_NAME}" if [ "$(which curl)x" != "x" ]; then curl -f --output /tmp/${SALT_ARCHIVE_NAME} ${SALT_DOWNLOAD_URL}