summaryrefslogtreecommitdiffstats
path: root/ansible/roles/package-repository/molecule/default/Dockerfile.j2
diff options
context:
space:
mode:
authorJan Benedikt <j.benedikt@partner.samsung.com>2020-02-10 16:29:43 +0100
committerJan Benedikt <j.benedikt@partner.samsung.com>2020-05-18 09:21:52 +0200
commit2c34d1d7a33e34c9984ac78460fd8e7c815024c5 (patch)
tree1bac4c90b3d8f899248919f97af24f4fe31547e8 /ansible/roles/package-repository/molecule/default/Dockerfile.j2
parent17e0a5eacaed7519f13e2c0f19749fb4263fb46a (diff)
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 <j.benedikt@partner.samsung.com> Change-Id: I85d4e6857536fa06c7eb4f4042c1ed64fcbf903e
Diffstat (limited to 'ansible/roles/package-repository/molecule/default/Dockerfile.j2')
-rw-r--r--ansible/roles/package-repository/molecule/default/Dockerfile.j25
1 files changed, 4 insertions, 1 deletions
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