Zero-downtime delivery · 8 / 10 ·
GitHub Actions runs the playbook
If a deploy can only happen from your laptop, that is not a pipeline — it is organized luck. This lab uses GitHub Actions, with a twin GitLab CI file running the same commands, so there is exactly one path to production: the same command, no matter who runs it.
The command that repeats
ansible-playbook examples/titikterang/ansible/deploy.yml \
-e image_tag=v1.2.4-devimage_tag always arrives through -e. It is never written into the playbook.
- A git push starts the path.
- The base image, then the app image, is built.
- The image is pushed to registry.titikterang.local:5000.
- CI runs ansible-playbook against the idle slot.
examples/titikterang/.github/workflows/deploy.yml and examples/titikterang/.gitlab-ci.yml mirror each other: build the base, build the app, push, deploy.
Quick recap
- One path to production: the same
ansible-playbookcommand on a laptop and in CI. - The version arrives via
-e image_tag=...— never hardcoded in the playbook. - Secrets live in the CI environment/Vault; never in the image, never in git.