ci: add ansible-lint workflow and fix all lint findings - #89
Merged
Merged
Conversation
Add a dedicated ansible-lint CI job and a .ansible-lint config, then resolve every finding the Galaxy importer's lint pass reported (the role now meets the ansible-lint `production` profile: 0 failures, 0 warnings). - .github/workflows/lint.yml: run ansible-lint on push/PR/dispatch - .ansible-lint: exclude .github/.venv/windows; skip yaml[line-length] (long templated URLs / one-line ternaries in vars that don't wrap) - FQCN for all builtin modules; yes/no -> true/false; quote/comment/comma and jinja spacing normalization (ansible-lint --fix) - name all include_tasks and molecule/playbook plays - add mode: "0644" to copy/template tasks (risky-file-permissions) - set -o pipefail + bash for piped shells (risky-shell-pipe) - keep tar for starship extract (BSD-tar on macOS) with noqa + changed_when - playbook.yml: viasite-ansible.zsh -> viasite.zsh (matches meta namespace) - meta/main.yml: MacOSX platform versions -> all (schema) - .gitignore: ignore .ansible lint cache Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The role has always been published as viasite-ansible.zsh (Galaxy role
id 29998), and install.sh / README reference that name. meta/main.yml
had drifted to namespace: viasite, which (a) broke the Galaxy import
("legacy namespace viasite does not exist") and (b) forced the earlier
playbook/converge refs to viasite.zsh, which then broke install.sh
(role symlinked as viasite-ansible.zsh -> "role 'viasite.zsh' not found").
Align everything to the real namespace:
- meta/main.yml: namespace viasite -> viasite-ansible
- playbook.yml / molecule converge: viasite.zsh -> viasite-ansible.zsh
ansible-lint still passes (0/0, production profile): the self-reference
resolves via meta namespace.role_name.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related things:
ansible-lintCI job and fix every finding. Thereleaseworkflow's Import to Ansible Galaxy step runsansible-lintand was reporting 215 findings. The role now meets the ansible-lintproductionprofile (0 failures, 0 warnings), enforced on every push/PR.legacy namespace viasite does not exist).Namespace fix (Option C)
meta/main.ymlhad drifted tonamespace: viasite, but the role has always been published asviasite-ansible.zsh(Galaxy role id 29998), andinstall.sh/README.mdreference that name. The mismatch:viasitenamespace doesn't exist), andplaybook.yml/ moleculeconverge.ymltoviasite.zsh, which then brokeinstall.sh(role is symlinked asviasite-ansible.zsh=>role 'viasite.zsh' was not found).Aligned everything to the real namespace:
metanamespace: viasite-ansible, andplaybook.yml/converge.ymlback toviasite-ansible.zsh. ansible-lint still passes — the self-reference resolves vianamespace.role_name.Lint changes
New CI + config
.github/workflows/lint.yml— runansible-linton push / PR / dispatch.ansible-lint— exclude.github/,.venv/,windows/; skip onlyyaml[line-length](long templated URLs / one-line ternaries invars/).gitignore— ignore the.ansiblelint cacheFixes
yes/no->true/false; quote/comment/comma/jinja spacing (ansible-lint --fix)include_tasksand molecule/playbook playsmode: "0644"on copy/template tasks (risky-file-permissions)set -o pipefail+executable: /bin/bashon piped shells (risky-shell-pipe)tarfor starship extract (BSD-tar on macOS) with# noqa+changed_whenmeta/main.yml: MacOSX platformversions->all(schema)Auto-quoting verified value-preserving (e.g.
'\e[1~'->"\\e[1~"); no keybinding/behavior changes.Verification checklist
lintworkflow greenmoleculescenarios pass: default / shared / user / starshipinstall.sh(ubuntu + macos) pass — role resolves asviasite-ansible.zshviasite-ansible🤖 Generated with Claude Code