templates/packer: use python3.10 on fedora

Ansible on fedora 40 seems broken, the default python 3.12 interpreter
doesn't work, 3.10 works but then the dnf module breaks.

Use 3.10 and stop using the dnf module.
This commit is contained in:
Sanne Raymaekers 2024-05-31 11:45:10 +02:00 committed by Achilleas Koutsou
parent 22e15da73c
commit 4629a31f22
3 changed files with 10 additions and 18 deletions

View file

@ -166,14 +166,12 @@ update-crypto-policies --set LEGACY
EOF
}
# Ansible is a little broken on fedora>39, needs python-six & 3.9
# Installing python3.9 breaks dnf update with ansible, so do it here
# first
# Ansible is quite broken on fedora 40, using python 3.10 + not using
# the dnf module seems to work.
provisioner "shell" {
only = ["amazon-ebs.fedora-40-x86_64", "amazon-ebs.fedora-40-aarch64"]
inline = [
"sudo dnf install -y python3.9",
"sudo dnf -y update"
"sudo dnf install -y python3.10",
]
}