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
31 changes: 31 additions & 0 deletions .github/workflows/lint-ansible.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint Ansible

on:
push:
branches: [main]
pull_request:
branches: [main]

workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Poetry
run: pipx install poetry
- name: Install dependencies
run: poetry install
working-directory: ./controls
- name: yamllint
run: poetry run yamllint .
working-directory: ./controls
# Blocking. The existing backlog is demoted to warnings in controls/.ansible-lint,
# so this fails only on rule types that are not already violated.
- name: ansible-lint
run: poetry run ansible-lint
working-directory: ./controls
257 changes: 113 additions & 144 deletions .github/workflows/test-molecule.yml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions controls/.ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# The tree carries a large stylistic backlog. These rules are demoted to warnings
# so the gate blocks only on rule types that are not already violated - anything
# new, plus real syntax errors. Remove entries as the backlog gets cleaned up.
warn_list:
- args
- command-instead-of-module
- command-instead-of-shell
- fqcn
- ignore-errors
- jinja
- key-order
- latest
- name
- no-changed-when
- no-free-form
- no-handler
- package-latest
- risky-file-permissions
- risky-shell-pipe
- schema
- role-name
- var-naming

# Legacy per-role test playbooks: the role is not resolvable from that directory,
# which ansible-lint reports as a syntax error. Not real syntax problems.
exclude_paths:
- roles/*/tests/
36 changes: 36 additions & 0 deletions controls/.yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# Based on ansible-lint config
extends: default

rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
truthy: disable

ignore: |
.venv/
Loading
Loading