Skip to content

style: Resolve ansible-lint warnings across all playbooks#20

Merged
ryanspletzer merged 2 commits intomainfrom
fix/ansible-lint-warnings
Mar 1, 2026
Merged

style: Resolve ansible-lint warnings across all playbooks#20
ryanspletzer merged 2 commits intomainfrom
fix/ansible-lint-warnings

Conversation

@ryanspletzer
Copy link
Owner

Summary

  • yaml[truthy]: Replace yes with true for all YAML truthy values across all 4 Ansible playbooks
  • ignore-errors: Replace ignore_errors: yes with failed_when: false for more precise error suppression (22 occurrences; 2 tasks in macOS that already had failed_when: false just had the redundant ignore_errors removed)
  • schema[playbook]: Use fully qualified become_method: ansible.builtin.sudo (2 occurrences in macOS)
  • command-instead-of-shell: Use command instead of shell for the Homebrew cask install task (no shell features needed)
  • Remove yaml[truthy], ignore-errors, and schema[playbook] from .ansible-lint warn_list — all violations resolved, future violations will now fail the build

Test plan

  • CI validate job passes with no annotations for the resolved rules
  • All 5 platform integration tests pass (playbook behavior unchanged)
  • Remaining warn_list rules (command-instead-of-shell, etc.) still produce warnings without failing

🤖 Generated with Claude Code

ryanspletzer and others added 2 commits March 1, 2026 18:01
- yaml[truthy]: Replace `yes` with `true` for all YAML truthy values
  (gather_facts, become, update_cache, upgrade, etc.)
- ignore-errors: Replace `ignore_errors: yes` with `failed_when: false`
  for more precise error suppression
- schema[playbook]: Use fully qualified `ansible.builtin.sudo` for
  become_method
- command-instead-of-shell: Use `command` instead of `shell` for the
  Homebrew cask install task (no shell features needed)

Remove yaml[truthy], ignore-errors, and schema[playbook] from the
ansible-lint warn_list since all violations are now resolved.
Future violations will fail the build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The WSL check uses `uname -r | grep` intentionally with non-zero exit
codes as data (0=not WSL, 1=WSL1, 2=WSL2). Adding pipefail would break
this logic. The previous `ignore_errors: yes` implicitly suppressed this
rule; `failed_when: false` does not, so an explicit noqa is needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ryanspletzer ryanspletzer merged commit d9d88e5 into main Mar 1, 2026
9 checks passed
@ryanspletzer ryanspletzer deleted the fix/ansible-lint-warnings branch March 1, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant