Martin Mágr | e51d8e7 | 2025-05-21 15:56:04 +0200 | [diff] [blame] | 1 | --- |
| 2 | - hosts: all |
| 3 | tasks: |
| 4 | - name: Install Python 3.12 on Centos distro |
| 5 | become: yes |
| 6 | ansible.builtin.shell: | |
| 7 | dnf install -y python3.12 python3.12-pip python3.12-devel pcp*devel gcc gcc-c++ |
| 8 | alternatives --install /usr/bin/python python /usr/bin/python3.12 10 |
| 9 | alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 10 |
| 10 | update-alternatives --set python /usr/bin/python3.12 |
| 11 | update-alternatives --set python3 /usr/bin/python3.12 |
| 12 | alternatives --install /usr/bin/pip pip /usr/bin/pip3.12 10 |
| 13 | alternatives --install /usr/bin/pip33 pip3 /usr/bin/pip3.12 10 |
| 14 | update-alternatives --set pip /usr/bin/pip3.12 |
| 15 | update-alternatives --set pip3 /usr/bin/pip3.12 |
| 16 | pip3.12 install pcp |