Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
profile: production

exclude_paths:
- .cache/
- .github/
- molecule/

offline: false

supported_ansible_also:
- ">=2.12"

verbosity: 1

warn_list:
- experimental
- yaml[truthy]
101 changes: 101 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Molecule CI

on:
pull_request:
branches:
- "master"
- "main"
push:
branches:
- "master"
- "main"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run lint
run: make lint

test:
name: Test ${{ matrix.os }}-${{ matrix.version }} (upgrade=${{ matrix.upgrade }}, style=${{ matrix.style }}, freq=${{ matrix.frequency }})
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
os: [debian, ubuntu]
version: ['12', '2204', '2404']
upgrade: ['false', 'true']
style: ['safe', 'full', 'dist']
frequency: ['once', 'boot', 'always']

# Exclude invalid OS/version combinations
exclude:
# Debian only has version 12
- os: debian
version: '2204'
- os: debian
version: '2404'
# Ubuntu doesn't have version 12
- os: ubuntu
version: '12'

# When upgrade is false, only test one combination of style/frequency
# (since they don't apply when upgrade is disabled)
- upgrade: 'false'
style: 'full'
- upgrade: 'false'
style: 'dist'
- upgrade: 'false'
frequency: 'boot'
- upgrade: 'false'
frequency: 'always'

# Add the image mapping based on OS and version
include:
- os: debian
version: '12'
image: geerlingguy/docker-debian12-ansible:latest
- os: ubuntu
version: '2204'
image: geerlingguy/docker-ubuntu2204-ansible:latest
- os: ubuntu
version: '2404'
image: geerlingguy/docker-ubuntu2404-ansible:latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run molecule test
run: molecule test
env:
MOLECULE_OS: ${{ matrix.os }}
MOLECULE_VERSION: ${{ matrix.version }}
MOLECULE_IMAGE: ${{ matrix.image }}
APT_UPGRADE: ${{ matrix.upgrade }}
APT_UPGRADE_STYLE: ${{ matrix.style }}
APT_UPGRADE_FREQUENCY: ${{ matrix.frequency }}
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ Icon
._*
.Spotlight-V100
.Trashes
.vagrant
test
.history
.vscode
.ci-env
.ansible
__pycache__
molecule*.log
.act/
.#*
*.*#
.molecule-state/
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: default
rules:
line-length:
max: 120
level: warning

# Ignore editor temporary/lock files (e.g. Emacs .#* files) that can appear in molecule dirs
ignore: |
**/.#*
Loading