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:
parent
22e15da73c
commit
4629a31f22
3 changed files with 10 additions and 18 deletions
|
|
@ -28,9 +28,8 @@
|
||||||
- name: Upgrade all packages
|
- name: Upgrade all packages
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
package:
|
shell: |
|
||||||
name: "*"
|
sudo dnf -y update
|
||||||
state: latest
|
|
||||||
register: result
|
register: result
|
||||||
retries: 5
|
retries: 5
|
||||||
until: result is success
|
until: result is success
|
||||||
|
|
@ -45,11 +44,8 @@
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
package:
|
shell: |
|
||||||
name:
|
sudo dnf -y install jq unzip vector
|
||||||
- jq
|
|
||||||
- unzip
|
|
||||||
- vector
|
|
||||||
register: result
|
register: result
|
||||||
retries: 5
|
retries: 5
|
||||||
until: result is success
|
until: result is success
|
||||||
|
|
@ -122,10 +118,8 @@
|
||||||
tags:
|
tags:
|
||||||
- ci
|
- ci
|
||||||
- rhel
|
- rhel
|
||||||
package:
|
shell: |
|
||||||
name:
|
sudo dnf -y install osbuild-composer-worker
|
||||||
- osbuild-composer-worker
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Install worker rpm from copr
|
- name: Install worker rpm from copr
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
|
|
@ -166,14 +166,12 @@ update-crypto-policies --set LEGACY
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ansible is a little broken on fedora>39, needs python-six & 3.9
|
# Ansible is quite broken on fedora 40, using python 3.10 + not using
|
||||||
# Installing python3.9 breaks dnf update with ansible, so do it here
|
# the dnf module seems to work.
|
||||||
# first
|
|
||||||
provisioner "shell" {
|
provisioner "shell" {
|
||||||
only = ["amazon-ebs.fedora-40-x86_64", "amazon-ebs.fedora-40-aarch64"]
|
only = ["amazon-ebs.fedora-40-x86_64", "amazon-ebs.fedora-40-aarch64"]
|
||||||
inline = [
|
inline = [
|
||||||
"sudo dnf install -y python3.9",
|
"sudo dnf install -y python3.10",
|
||||||
"sudo dnf -y update"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ EOF
|
||||||
|
|
||||||
if [[ "$item" == templates/packer/ansible/inventory/fedora* ]]; then
|
if [[ "$item" == templates/packer/ansible/inventory/fedora* ]]; then
|
||||||
tee -a "$item/group_vars/all.yml" <<EOF
|
tee -a "$item/group_vars/all.yml" <<EOF
|
||||||
ansible_python_interpreter: /usr/bin/python3.9
|
ansible_python_interpreter: /usr/bin/python3.10
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue