mirror of https://github.com/ceph/ceph-ansible.git
install python-xml on SUSE/openSUSE only if python2 is installed
raw_install_python.yml: on SUSE/openSUSE, install python-xml package only
if python2 is installed already
Background:
On SLES 15.x / openSUSE Leap 15.x, the python2 package `python-base` provides
/usr/bin/python, while python3 only provides /usr/bin/python3.
Signed-off-by: Johannes Kastl <kastl@b1-systems.de>
(cherry picked from commit a1811ca097
)
pull/4487/head
parent
146f2e8de3
commit
2463c8eca1
|
@ -55,4 +55,15 @@
|
|||
register: result
|
||||
until: result is succeeded
|
||||
when: stat_zypper.rc == 0
|
||||
when: not True in (systempython.results | selectattr('stat', 'defined') | map(attribute='stat.exists') | list | unique)
|
||||
when: not True in (systempython.results | selectattr('stat', 'defined') | map(attribute='stat.exists') | list | unique)
|
||||
|
||||
- name: install python-xml for opensuse only if python2 is installed already
|
||||
raw: zypper -n install python-xml
|
||||
register: result
|
||||
until: result is succeeded
|
||||
with_items: "{{ systempython.results }}"
|
||||
when:
|
||||
- stat_zypper.rc is defined
|
||||
- stat_zypper.rc == 0
|
||||
- item.stat.exists | bool
|
||||
- item.stat.path == '/usr/bin/python'
|
||||
|
|
Loading…
Reference in New Issue