Commit 07a0d860 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web_deploy: Support more distros and install whatever ansible available (1.9 or 2)...

parent c2008ea6
...@@ -40,7 +40,7 @@ fi ...@@ -40,7 +40,7 @@ fi
# Warn users who aren't on an explicitly supported distro, but allow them to # Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``export FORCE=yes`` # override check and attempt installation with ``export FORCE=yes``
if [[ ! ${DISTRO} =~ (wheezy|jessie|trusty|vivid|xenial|rhel7|rhel6|LinuxMint-17.2) ]]; then if [[ ! ${DISTRO} =~ (wheezy|jessie|trusty|vivid|xenial|rhel7|rhel6|LinuxMint-17.2|f20|f19|f26|artful|stretch) ]]; then
echo "WARNING: this script has not been tested on $DISTRO" echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes" die $LINENO "If you wish to run this script anyway run with FORCE=yes"
...@@ -52,7 +52,7 @@ if [[ $DISTRO == "wheezy" ]]; then ...@@ -52,7 +52,7 @@ if [[ $DISTRO == "wheezy" ]]; then
echo "deb http://ftp.debian.org/debian wheezy-backports main contrib " > /etc/apt/sources.list.d/wheezy-backports.list echo "deb http://ftp.debian.org/debian wheezy-backports main contrib " > /etc/apt/sources.list.d/wheezy-backports.list
fi fi
if is_fedora && [[ $DISTRO == "rhel7" ]]; then if is_fedora && [[ $DISTRO =~ rhel7|f20|f19 ]]; then
# RHEL requires EPEL for many Ansible dependencies # RHEL requires EPEL for many Ansible dependencies
# NOTE: We always remove and install latest -- some environments # NOTE: We always remove and install latest -- some environments
...@@ -123,20 +123,8 @@ EOF ...@@ -123,20 +123,8 @@ EOF
fi fi
is_package_installed openssl || install_package openssl is_package_installed openssl || install_package openssl
# stick to a specific ansible package version is_package_installed ansible || install_package ansible
if is_ubuntu; then
# is_ubuntu also handle debian distro
is_package_installed ansible || install_package ansible=1.*
elif is_fedora; then
# is_fedora also handle CentOS distro
if [[ "$os_VENDOR" =~ (CentOS) ]] ; then
is_package_installed ansible || install_package ansible
else
is_package_installed ansible || install_package ansible1.9.noarch
fi
else
is_package_installed ansible || install_package ansible
fi
is_package_installed python-setuptools || install_package python-setuptools is_package_installed python-setuptools || install_package python-setuptools
if is_ubuntu && [[ $DISTRO == "trusty" ]]; then if is_ubuntu && [[ $DISTRO == "trusty" ]]; then
......
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>955.9190.35092.39833</string> </value> <value> <string>961.29395.5252.38758</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1478606319.62</float> <float>1512479078.93</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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