Ubuntu 20.04 Support

This commit is contained in:
Mike Reeves
2021-09-20 17:24:47 -04:00
parent 3924b8f5db
commit 50b78681f2
6 changed files with 30 additions and 4 deletions

View File

@@ -107,10 +107,17 @@ commonpkgs:
heldpackages: heldpackages:
pkg.installed: pkg.installed:
- pkgs: - pkgs:
{% if grains['codename'] == 'bionic' %}
- containerd.io: 1.4.4-1 - containerd.io: 1.4.4-1
- docker-ce: 5:20.10.5~3-0~ubuntu-bionic - docker-ce: 5:20.10.5~3-0~ubuntu-bionic
- docker-ce-cli: 5:20.10.5~3-0~ubuntu-bionic - docker-ce-cli: 5:20.10.5~3-0~ubuntu-bionic
- docker-ce-rootless-extras: 5:20.10.5~3-0~ubuntu-bionic - docker-ce-rootless-extras: 5:20.10.5~3-0~ubuntu-bionic
{% elif grains['codename'] == 'focal' %}
- containerd.io: 1.4.9-1
- docker-ce: 5:20.10.8~3-0~ubuntu-focal
- docker-ce-cli: 5:20.10.5~3-0~ubuntu-focal
- docker-ce-rootless-extras: 5:20.10.5~3-0~ubuntu-focal
{% endif %}
- hold: True - hold: True
- update_holds: True - update_holds: True

View File

@@ -22,7 +22,11 @@ mysqlpkgs:
- skip_suggestions: False - skip_suggestions: False
- pkgs: - pkgs:
{% if grains['os'] != 'CentOS' %} {% if grains['os'] != 'CentOS' %}
- python-mysqldb {% if grains['codename'] == 'bionic' %}
- python3-mysqldb
{% elif grains['codename'] == 'focal' %}
- python3-mysqldb
{% endif %}
{% else %} {% else %}
- MySQL-python - MySQL-python
{% endif %} {% endif %}

View File

@@ -3,7 +3,11 @@ saltpymodules:
pkg.installed: pkg.installed:
- pkgs: - pkgs:
- python-docker - python-docker
{% if grains['codename'] == 'bionic' %}
- python-m2crypto - python-m2crypto
{% elif grains['codename'] == 'focal' %}
- python3-m2crypto
{% endif %}
{% endif %} {% endif %}
salt_bootstrap: salt_bootstrap:

View File

@@ -3082,8 +3082,12 @@ install_ubuntu_git_deps() {
__PACKAGES="${__PACKAGES} python3-setuptools" __PACKAGES="${__PACKAGES} python3-setuptools"
else else
# There is no m2crypto package for Py3 at this time - only install for Py2 # There is no m2crypto package for Py3 at this time - only install for Py2
if [ $DISTRO_CODENAME == "focal" ]; then
__PACKAGES="${__PACKAGES} python3-m2crypto"
else
__PACKAGES="${__PACKAGES} python-m2crypto" __PACKAGES="${__PACKAGES} python-m2crypto"
fi fi
fi
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests"

View File

@@ -42,7 +42,11 @@ m2cryptopkgs:
pkg.installed: pkg.installed:
- skip_suggestions: False - skip_suggestions: False
- pkgs: - pkgs:
{% if grains['codename'] == 'bionic' %}
- python-m2crypto - python-m2crypto
{% elif grains['codename'] == 'focal' %}
- python3-m2crypto
{% endif %}
{% endif %} {% endif %}
removefbcertdir: removefbcertdir:

View File

@@ -1104,8 +1104,8 @@ detect_os() {
OS=ubuntu OS=ubuntu
if grep -q "UBUNTU_CODENAME=bionic" /etc/os-release; then if grep -q "UBUNTU_CODENAME=bionic" /etc/os-release; then
OSVER=bionic OSVER=bionic
elif grep -q "UBUNTU_CODENAME=xenial" /etc/os-release; then elif grep -q "UBUNTU_CODENAME=focal" /etc/os-release; then
OSVER=xenial OSVER=focal
else else
echo "We do not support your current version of Ubuntu." echo "We do not support your current version of Ubuntu."
exit 1 exit 1
@@ -2159,9 +2159,12 @@ saltify() {
else else
DEBIAN_FRONTEND=noninteractive retry 50 10 "apt-get -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" upgrade" >> "$setup_log" 2>&1 || exit 1 DEBIAN_FRONTEND=noninteractive retry 50 10 "apt-get -y -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" upgrade" >> "$setup_log" 2>&1 || exit 1
if [ $OSVER != "xenial" ]; then if [ $OSVER == "bionic" ]; then
# Switch to Python 3 as default if this is not xenial # Switch to Python 3 as default if this is not xenial
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10 >> "$setup_log" 2>&1 update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10 >> "$setup_log" 2>&1
elif [ $OSVER == "focal" ]; then
# Switch to Python 3 as default if this is not xenial
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 10 >> "$setup_log" 2>&1
fi fi
local pkg_arr=( local pkg_arr=(