mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-12-21 19:09:37 +01:00
981d4f9072
* allow to installation via os package manager or pip * Run a second time to install via package manager * Check for EPEL if distro package requested. * Split dep lists to avoid installing build deps when using distro pkg Co-authored-by: Stefan Morgenthaler <dev@morgenthaler.at> Co-authored-by: Manu <manu@snapdragon.cc>
24 lines
1.3 KiB
Django/Jinja
24 lines
1.3 KiB
Django/Jinja
# Molecule managed
|
|
|
|
{% if item.registry is defined %}
|
|
FROM {{ item.registry.url }}/{{ item.image }}
|
|
{% else %}
|
|
FROM {{ item.image }}
|
|
{% endif %}
|
|
|
|
{% if item.env is defined %}
|
|
{% for var, value in item.env.items() %}
|
|
{% if value %}
|
|
ENV {{ var }} {{ value }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 python3-pip sudo bash ca-certificates iproute2 python3-apt aptitude && apt-get clean; \
|
|
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install /usr/bin/python3 /usr/bin/python3-config /usr/bin/dnf-3 sudo bash iproute && dnf clean all; \
|
|
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute && 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 iproute2 && zypper clean -a; \
|
|
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
|
|
elif [ $(command -v pacman) ]; then pacman --noconfirm -Suy python python-pip sudo openssh; \
|
|
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi
|