Skip to content

fixed ansible-lint on GitHub actions #5

fixed ansible-lint on GitHub actions

fixed ansible-lint on GitHub actions #5

Workflow file for this run

name: Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
ansible-lint:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@main
test:
needs:
- ansible-lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- name: "centos"
namespace: "quay.io/centos"
tag: "stream8"
- name: "centos"
namespace: "quay.io/centos"
tag: "stream9"
- name: "fedora"
namespace: "quay.io/fedora"
tag: "latest"
scenario:
- default
- auto_reboot
container:
image: "quay.io/fedora/fedora:latest"
# --cgroupns=host needed due to https://github.com/containers/podman/discussions/12898#discussioncomment-4078154
options: "--privileged --volume /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host"
env:
HOME: "/root"
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"
- name: install dependencies
run: |
dnf install -y podman \
which \
python3-molecule \
python3-click-help-colors \
python3-rich \
python3-enrich \
python3-pluggy \
python3-cookiecutter
- name: run molecule
run: |
export HOME="/root"
export image="${{ matrix.image.name }}"
export namespace="${{ matrix.image.namespace }}"
export tag="${{ matrix.image.tag }}"
export PY_COLORS=1
export ANSIBLE_FORCE_COLOR=1
molecule test -s "${{ matrix.scenario }}"
working-directory: "${{ github.repository }}"