diff options
author | Samuli Silvius <s.silvius@partner.samsung.com> | 2019-03-20 16:14:55 +0200 |
---|---|---|
committer | Samuli Silvius <s.silvius@partner.samsung.com> | 2019-04-16 08:35:45 +0300 |
commit | fef434d08941acc5394eac6bc24c0dae75cbeca8 (patch) | |
tree | 7e4687e7630bf29c52b414b28f2758e9013d22ec /ansible/roles/setup/molecule/default/Dockerfile.j2 | |
parent | 52eb50721e990e277ed8729225faff305dee11da (diff) |
Molecule role tests for setup role
Issue-ID: OOM-1742
Change-Id: I3087952f3d4e5de20af83e714c0d5444999a5ee2
Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
Diffstat (limited to 'ansible/roles/setup/molecule/default/Dockerfile.j2')
-rw-r--r-- | ansible/roles/setup/molecule/default/Dockerfile.j2 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ansible/roles/setup/molecule/default/Dockerfile.j2 b/ansible/roles/setup/molecule/default/Dockerfile.j2 new file mode 100644 index 00000000..0a605536 --- /dev/null +++ b/ansible/roles/setup/molecule/default/Dockerfile.j2 @@ -0,0 +1,14 @@ +# Molecule managed + +{% if item.registry is defined %} +FROM {{ item.registry.url }}/{{ item.image }} +{% else %} +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; \ + 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 |