Commit d2edd114 authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Install Ansible with pip in Suse.

Suse SLE 15 SP6 has no official ansible package.
Instead, we use the official Ansible installation method, by installing
it using pip.

See merge request nexedi/slapos.core!655
parent b0f6e98b
......@@ -56,21 +56,20 @@ fi
is_package_installed unzip || install_package unzip
is_package_installed openssl || install_package openssl
is_package_installed ansible || install_package ansible
if [[ $DISTRO = sle15.6 ]]; then
# Python 3.11 is in a separate module, called Python 3, while the base system has Python 3.6.
# If the Python 3 module is enabled, we assume that the user has preference for it.
# Otherwise, we install the base packages.
is_package_installed python311-pip || is_package_installed python3-pip || install_package python311-pip || install_package python3-pip
pip3 install --upgrade pip
elif ! is_ubuntu || [[ $DISTRO = wheezy || $DISTRO == jessie || $DISTRO == stretch || $DISTRO == xenial || $DISTRO == bionic ]]; then
if ! is_suse && ! is_ubuntu || [[ $DISTRO = wheezy || $DISTRO == jessie || $DISTRO == stretch || $DISTRO == xenial || $DISTRO == bionic ]]; then
is_package_installed python-pip || install_package python-pip
pip install --upgrade "pip < 21.0"
else
# Ansible is using python3 now
is_package_installed python3-pip || install_package python3-pip
pip3 install --upgrade --ignore-installed pip
python3 -m pip install --upgrade --ignore-installed pip
fi
if is_suse; then
python3 -m pip install ansible
else
is_package_installed ansible || install_package ansible
fi
if is_ubuntu && [[ $DISTRO == focal || $DISTRO == buster ]]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment