mirror of
https://github.com/Dannecron/netology-devops-ansible-vector.git
synced 2025-12-25 14:32:34 +03:00
add support for debian-based distro, add new testcase
This commit is contained in:
@@ -15,11 +15,7 @@ ENV {{ var }} {{ value }}
|
||||
|
||||
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get upgrade -y && apt-get install -y apt-transport-https gnupg2 python3-minimal python3-apt man systemd systemd-sysv rsyslog sudo bash ca-certificates iproute2 && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes upgrade && dnf --assumeyes install python3 sudo python3-devel python*-dnf bash iproute && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then sed -i 's/^\(tsflags=*\)/# \1/g' /etc/yum.conf && yum makecache fast && yum upgrade -y && yum makecache fast && yum install -y sudo python3 systemd rsyslog man 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 xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi
|
||||
elif [ $(command -v yum) ]; then sed -i 's/^\(tsflags=*\)/# \1/g' /etc/yum.conf && yum makecache fast && yum upgrade -y && yum makecache fast && yum install -y sudo python3 systemd rsyslog man yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; fi
|
||||
|
||||
RUN set -xe \
|
||||
&& groupadd -r ${ANSIBLE_USER} \
|
||||
|
||||
@@ -24,6 +24,23 @@ platforms:
|
||||
SUDO_GROUP: wheel
|
||||
DEPLOY_GROUP: deployer
|
||||
container: docker
|
||||
|
||||
- name: debian_bullseye_11
|
||||
image: debian:bullseye
|
||||
privileged: true
|
||||
command: /sbin/init
|
||||
capabilities:
|
||||
- SYS_ADMIN
|
||||
tmpfs:
|
||||
- /run
|
||||
- /tmp
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup
|
||||
env:
|
||||
ANSIBLE_USER: ansible
|
||||
SUDO_GROUP: sudo
|
||||
DEPLOY_GROUP: deployer
|
||||
container: docker
|
||||
provisioner:
|
||||
name: ansible
|
||||
verifier:
|
||||
|
||||
Reference in New Issue
Block a user