Ansible
Ansible CI on GitHub Actions
Collection and role installation runs before every playbook.
50s → 3s
Galaxy install
Collection and role installation runs before every playbook.
Why it happens
~/.ansible/collections is not cached, so Galaxy is queried on every run.
What to change
- Cache ~/.ansible/collections keyed on requirements.yml
- Run ansible-lint in a parallel job rather than serially
- Use --check mode in pull requests and apply only on merge
Ansible on runnerhut
yaml
jobs: lint: runs-on: runnerhut-2vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - run: ansible-galaxy install -r requirements.yml - run: ansible-lintThe only runnerhut-specific line is `runs-on: runnerhut-2vcpu-ubuntu-2404`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.