diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 index 724a979..e460824 100644 --- a/molecule/default/Dockerfile.j2 +++ b/molecule/default/Dockerfile.j2 @@ -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} \ diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 140d746..7316620 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -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: diff --git a/tasks/main.yml b/tasks/main.yml index 09c267e..bd30dcd 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,9 +1,7 @@ --- - name: vector | install archive manager - become: true - ansible.builtin.yum: - name: - - tar + ansible.builtin.include_tasks: + file: "pre_install/{{ ansible_pkg_mgr }}.yml" - name: vector | get distrib ansible.builtin.get_url: url: "https://packages.timber.io/vector/{{ vector_version }}/vector-{{ vector_version }}-x86_64-unknown-linux-musl.tar.gz" diff --git a/tasks/pre_install/apt.yml b/tasks/pre_install/apt.yml new file mode 100644 index 0000000..b0dddac --- /dev/null +++ b/tasks/pre_install/apt.yml @@ -0,0 +1,6 @@ +--- +- name: vector | install archive manager + become: true + ansible.builtin.apt: + name: + - tar diff --git a/tasks/pre_install/yum.yml b/tasks/pre_install/yum.yml new file mode 100644 index 0000000..3db6cca --- /dev/null +++ b/tasks/pre_install/yum.yml @@ -0,0 +1,6 @@ +--- +- name: vector | install archive manager + become: true + ansible.builtin.yum: + name: + - tar