aboutsummaryrefslogtreecommitdiffstats
path: root/roles/prerequisites/tasks/main.yml
blob: d56114f549583af32976b68b4e354d7f2676bbef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---

- name: retrieve python installation
  ansible.builtin.raw: command -v python3
  register: prerequisites__register_python_present
  changed_when: prerequisites__register_python_present.rc != 0
  failed_when: false

- name: bruteforce python installation with all packages possiblity
  ansible.builtin.raw: |
    ! pkg_add python3 &&
    ! pkg install python3 &&
    ! apk add python
  register: result
  ignore_errors: true
  failed_when: result.rc not in [0, 1]
  poll: 0
  when: prerequisites__register_python_present.rc != 0
remember that computers suck.