Skip to content

Add GitHub Actions workflow for Ansible playbook validation#71

Open
michaelbarton wants to merge 2 commits intomasterfrom
claude/add-neovim-setup-tasks-aVn8M
Open

Add GitHub Actions workflow for Ansible playbook validation#71
michaelbarton wants to merge 2 commits intomasterfrom
claude/add-neovim-setup-tasks-aVn8M

Conversation

@michaelbarton
Copy link
Owner

Summary

This PR adds CI/CD automation for validating the Ansible playbook and refactors the Neovim npm package installation to use a more portable approach.

Key Changes

  • New GitHub Actions workflow (.github/workflows/ansible.yml):

    • Automatically runs on every push to validate the Ansible playbook
    • Sets up the required environment (Python 3.11, Neovim, uv package manager)
    • Creates necessary stub files and directories excluded from version control
    • Performs syntax validation of the playbook
    • Executes the playbook with macOS-specific tasks skipped for Linux CI environment
  • Refactored Neovim npm package installation (ansible/tasks/neovim.yml):

    • Replaced community.general.npm module with ansible.builtin.command for better portability
    • Uses explicit npm install command with --prefix flag instead of module-specific parameters
    • Maintains the same functionality while reducing external module dependencies

Implementation Details

The workflow creates a complete dotfiles environment in CI by:

  • Symlinking the repository to ~/.dotfiles
  • Creating stub files for .mise.toml and SSH config (excluded from version control)
  • Installing all required tools (Python, Neovim, Ansible via uv)
  • Running both syntax validation and actual playbook execution

The npm installation change improves compatibility across different Ansible versions and environments by using the standard npm CLI directly.

https://claude.ai/code/session_01Vm5EEsQ5uFKoni6qWEDQd8

claude added 2 commits March 1, 2026 23:55
Removes the dependency on the community.general collection which
was producing a warning about not supporting the installed Ansible
version. Uses npm install --prefix directly instead.

https://claude.ai/code/session_01Vm5EEsQ5uFKoni6qWEDQd8
Runs the full playbook (minus macOS-only launch agents) on
ubuntu-latest: syntax check then an actual apply. Installs
Neovim, Python 3.11, and virtualenv so the neovim setup tasks
(pip venv, Lazy sync, treesitter) can run too.

https://claude.ai/code/session_01Vm5EEsQ5uFKoni6qWEDQd8
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.

2 participants