File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed
hooks/overcloud-host-configure/pre.d Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ - name : Install Python 3.12 to hosts
2
+ hosts : all
3
+ become : true
4
+ tasks :
5
+ - name : Install Python 3.12
6
+ ansible.builtin.dnf :
7
+ name : python3.12
8
+ state : latest
9
+
10
+ - name : Edit symlinks to make Python 3.12 default (/usr/bin)
11
+ ansible.builtin.file :
12
+ src : /usr/bin/python3.12
13
+ dest : /usr/bin/python3
14
+ owner : root
15
+ group : root
16
+ state : link
17
+ force : true
18
+
19
+ - name : Edit symlinks to make Python 3.12 default (/bin)
20
+ ansible.builtin.file :
21
+ src : /bin/python3.12
22
+ dest : /bin/python3
23
+ owner : root
24
+ group : root
25
+ state : link
26
+ force : true
27
+
28
+ - name : Verify Python version
29
+ ansible.builtin.command : python3 --version
30
+ register : python_version
31
+
32
+ - name : Print Python version
33
+ ansible.builtin.debug :
34
+ var : python_version.stdout
35
+
36
+ - name : Ensure Python 3.12 pip
37
+ ansible.builtin.command : python3 -m ensurepip
Original file line number Diff line number Diff line change
1
+ ../../../ansible/rocky9-python312.yml
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -x
4
+
5
+ sudo dnf install -y python3.12
6
+ sudo ln -sf /bin/python3.12 /bin/python3
7
+ sudo ln -sf /usr/bin/python3.12 /usr/bin/python3
8
+
9
+ echo $( python3 --version)
10
+
11
+ sudo python3 -m ensurepip
You can’t perform that action at this time.
0 commit comments