mirror of
https://github.com/planetmint/planetmint.git
synced 2025-06-03 04:36:40 +00:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
# Copyright © 2020 Interplanetary Database Association e.V.,
|
|
# Planetmint and IPDB software contributors.
|
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
|
|
|
---
|
|
- name: Check version of python3
|
|
shell: "python3 -c 'import platform; print(platform.python_version())' | cut -d. -f-2"
|
|
register: py39_ver
|
|
tags: [py39]
|
|
|
|
- name: Install py39 | dnf
|
|
dnf:
|
|
name: "{{ item }}"
|
|
state: present
|
|
with_items:
|
|
- "python39"
|
|
- libselinux-python
|
|
- policycoreutils-python
|
|
- wget
|
|
when: py39_ver.stdout | float < 3.9
|
|
tags: [py39]
|
|
|
|
- name: Update fedora
|
|
shell: dnf -y update
|
|
register: update_fed
|
|
failed_when: "'FAILED' in update_fed.stderr or update_fed.rc != 0"
|
|
args:
|
|
warn: no
|
|
tags: [py39]
|
|
|
|
- name: Creating files for python 3.9 installation
|
|
file:
|
|
template: src=install_pip36.j2 dest=/home/vagrant/install_pip36.bash
|
|
mode: 0755
|
|
when: py39_ver.stdout | float < 3.9
|
|
tags: [py39]
|
|
|
|
- name: Install pip36
|
|
shell: "bash /home/vagrant/install_pip36.bash > install_pip36.txt"
|
|
register: install_pip36
|
|
failed_when: "'FAILED' in install_pip36.stderr or install_pip36.rc != 0"
|
|
when: py39_ver.stdout | float < 3.9
|
|
tags: [py39] |