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; \
|
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} \
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
6
tasks/pre_install/apt.yml
Normal file
6
tasks/pre_install/apt.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: vector | install archive manager
|
||||||
|
become: true
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name:
|
||||||
|
- tar
|
||||||
6
tasks/pre_install/yum.yml
Normal file
6
tasks/pre_install/yum.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- name: vector | install archive manager
|
||||||
|
become: true
|
||||||
|
ansible.builtin.yum:
|
||||||
|
name:
|
||||||
|
- tar
|
||||||
Reference in New Issue
Block a user