forked from ceph/ceph-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathraw_install_python.yml
More file actions
27 lines (24 loc) · 891 Bytes
/
raw_install_python.yml
File metadata and controls
27 lines (24 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
- name: check for python
stat:
path: /usr/bin/python
ignore_errors: yes
register: systempython
- name: install python for debian based systems
raw: apt-get -y install python-simplejson
ignore_errors: yes
register: result
when: systempython.stat is undefined or not systempython.stat.exists
until: result is succeeded
- name: install python for fedora
raw: dnf -y install python3; ln -sf /usr/bin/python3 /usr/bin/python creates=/usr/bin/python
ignore_errors: yes
register: result
when: systempython.stat is undefined or not systempython.stat.exists
until: (result is succeeded) and ('Failed' not in result.stdout)
- name: install python for opensuse
raw: zypper -n install python-base creates=/usr/bin/python2.7
ignore_errors: yes
register: result
when: systempython.stat is undefined or not systempython.stat.exists
until: result is succeeded