From 10ed2c3f447179d7fe7c2d082ebe9d79deb93559 Mon Sep 17 00:00:00 2001 From: Manu <3916435+m3nu@users.noreply.github.com> Date: Wed, 18 Aug 2021 18:53:42 +0400 Subject: [PATCH] Fix for Debian 11 (#76) * Fix for Debian 11 install * Pin CentOS version * Bump Python version --- .github/workflows/main.yml | 4 ++-- molecule/default/Dockerfile.j2 | 4 ++-- molecule/default/molecule.yml | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7271b82..501bfe9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.7 + python-version: 3.8 - name: Install Molecule run: | pip install -U pip setuptools wheel @@ -18,4 +18,4 @@ jobs: # - name: Debugging with tmate # uses: mxschmitt/action-tmate@v3.5 - name: Test using Molecule - run: molecule test \ No newline at end of file + run: molecule test diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 index 80a5c31..4227711 100644 --- a/molecule/default/Dockerfile.j2 +++ b/molecule/default/Dockerfile.j2 @@ -14,9 +14,9 @@ ENV {{ var }} {{ value }} {% endfor %} {% endif %} -RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 python-apt aptitude && apt-get clean; \ +RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python 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 xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi \ No newline at end of file + elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index bdf618e..f8c8439 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -6,12 +6,14 @@ driver: platforms: - name: centos-7 image: centos:7 - - name: centos-latest - image: centos:latest + - name: centos-8 + image: centos:8 - name: fedora-latest image: fedora:latest - - name: debian-stable - image: debian:stable + - name: debian-bullseye + image: debian:bullseye + - name: debian-buster + image: debian:buster - name: ubuntu-bionic image: ubuntu:bionic - name: ubuntu-latest @@ -23,4 +25,4 @@ verifier: lint: | set -e yamllint . - ansible-lint . \ No newline at end of file + ansible-lint .