From 4eb4fcce553d2e83a46194d7da724ebd5be714e2 Mon Sep 17 00:00:00 2001 From: blai Date: Sat, 27 Jun 2026 12:26:59 +0200 Subject: [PATCH 1/2] Update linting configuration and PR template Add ansible-lint recommended yamllint settings (comments spacing, octal-values). Suppress expected args[module] false positives in ansible-lint. Update PR template checklist to reference ruff and ansible-lint instead of the removed flake8. --- .ansible-lint | 1 + .github/PULL_REQUEST_TEMPLATE.md | 2 +- .yamllint | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.ansible-lint b/.ansible-lint index d508a9a..0a1f53b 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -73,3 +73,4 @@ warn_list: - no-changed-when - command-instead-of-shell - risky-shell-pipe + - args[module] diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ab3df15..1e2cd7c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,6 +15,6 @@ ## Checklist - [ ] Sanity tests pass (`ansible-test sanity`) -- [ ] Linting passes (`flake8`, `yamllint`) +- [ ] Linting passes (`ruff`, `yamllint`, `ansible-lint`) - [ ] Changelog fragment added (if user-facing change) - [ ] Documentation updated (if applicable) diff --git a/.yamllint b/.yamllint index 09f1e06..b3389b9 100644 --- a/.yamllint +++ b/.yamllint @@ -7,3 +7,8 @@ rules: allow-non-breakable-inline-mappings: true truthy: allowed-values: ['true', 'false', 'yes', 'no'] + comments: + min-spaces-from-content: 1 + octal-values: + forbid-implicit-octal: true + forbid-explicit-octal: true From f10c57f563d40280bf7949da164866c39e895778 Mon Sep 17 00:00:00 2001 From: blai Date: Sat, 27 Jun 2026 12:43:03 +0200 Subject: [PATCH 2/2] Add mock_roles for filetree_read to fix syntax-check error The playbooks/flatten_filetree_create_output.yaml references the ctrliq.ascender.filetree_read role, which ansible-lint cannot resolve when the collection is not installed. Add it to mock_roles. --- .ansible-lint | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.ansible-lint b/.ansible-lint index 0a1f53b..79d9be9 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -3,6 +3,10 @@ offline: true +# Mock collection roles so ansible-lint doesn't error on unresolved FQCNs +mock_roles: + - ctrliq.ascender.filetree_read + # Mock collection modules so ansible-lint doesn't error on unresolved FQCNs mock_modules: - ctrliq.ascender.ad_hoc_command