Skip to content

Remove support for Ubuntu 20 and add support for Ubuntu 24 #201

Remove support for Ubuntu 20 and add support for Ubuntu 24

Remove support for Ubuntu 20 and add support for Ubuntu 24 #201

Workflow file for this run

---
name: Test ansible role
on:
pull_request:
push:
branches:
- master
schedule:
- cron: "22 2 * * 2"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
scenario:
- debian-11
- debian-12
- ubuntu-2204
- ubuntu-2404
steps:
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Remove pre-installed ansible
run: sudo apt-get remove --purge -y ansible
- name: Install dependencies
run: pip install ansible ansible-lint docker molecule molecule-plugins[docker] pytest-testinfra black
- name: Stop MySQL on GitHub Runner
run: sudo systemctl stop mysql
- name: Display versions
run: |
python -c "import sys; print(sys.version)"
pip --version
ansible --version
molecule --version
- name: Lint code
run: |
ansible-lint
black --check .
env:
PY_COLORS: "1"
- name: Run Molecule
run: molecule --base-config molecule/shared/base.yml test --scenario-name ${{ matrix.scenario }}
env:
PY_COLORS: "1"