From 2c34d1d7a33e34c9984ac78460fd8e7c815024c5 Mon Sep 17 00:00:00 2001 From: Jan Benedikt Date: Mon, 10 Feb 2020 16:29:43 +0100 Subject: Adding Ubuntu support in Ansible - package-repository role Extending ansible playbooks of ubuntu support. Creating new test with Ubuntu image for Molecule in package-repository role. Issue-ID: OOM-1671 Signed-off-by: Jan Benedikt Change-Id: I85d4e6857536fa06c7eb4f4042c1ed64fcbf903e --- ansible/roles/package-repository/molecule/default/Dockerfile.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ansible/roles/package-repository/molecule/default/Dockerfile.j2') diff --git a/ansible/roles/package-repository/molecule/default/Dockerfile.j2 b/ansible/roles/package-repository/molecule/default/Dockerfile.j2 index 0a605536..b76a6dd7 100644 --- a/ansible/roles/package-repository/molecule/default/Dockerfile.j2 +++ b/ansible/roles/package-repository/molecule/default/Dockerfile.j2 @@ -6,9 +6,12 @@ FROM {{ item.registry.url }}/{{ item.image }} FROM {{ item.image }} {% endif %} -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \ +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y sudo bash ca-certificates python3-apt && apt-get clean; \ elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python2-dnf bash && dnf clean all; \ elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \ elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \ elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \ elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates && xbps-remove -O; fi + +# Create symlink python3 -> python +RUN if [ $(command -v apt-get) ]; then ln -s /usr/bin/python3 /usr/bin/python; fi -- cgit 1.2.3-korg