add support for debian-based distro, add new testcase

This commit is contained in:
2022-08-05 10:16:27 +07:00
parent c8bbbe4a4d
commit abfd096abe
5 changed files with 32 additions and 9 deletions

View File

@@ -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; \ 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; 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; \
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
RUN set -xe \ RUN set -xe \
&& groupadd -r ${ANSIBLE_USER} \ && groupadd -r ${ANSIBLE_USER} \

View File

@@ -24,6 +24,23 @@ platforms:
SUDO_GROUP: wheel SUDO_GROUP: wheel
DEPLOY_GROUP: deployer DEPLOY_GROUP: deployer
container: docker 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: provisioner:
name: ansible name: ansible
verifier: verifier:

View File

@@ -1,9 +1,7 @@
--- ---
- name: vector | install archive manager - name: vector | install archive manager
become: true ansible.builtin.include_tasks:
ansible.builtin.yum: file: "pre_install/{{ ansible_pkg_mgr }}.yml"
name:
- tar
- name: vector | get distrib - name: vector | get distrib
ansible.builtin.get_url: ansible.builtin.get_url:
url: "https://packages.timber.io/vector/{{ vector_version }}/vector-{{ vector_version }}-x86_64-unknown-linux-musl.tar.gz" url: "https://packages.timber.io/vector/{{ vector_version }}/vector-{{ vector_version }}-x86_64-unknown-linux-musl.tar.gz"

View File

@@ -0,0 +1,6 @@
---
- name: vector | install archive manager
become: true
ansible.builtin.apt:
name:
- tar

View File

@@ -0,0 +1,6 @@
---
- name: vector | install archive manager
become: true
ansible.builtin.yum:
name:
- tar