pez-infra/ansible/Makefile
Rasmus Wejlgaard 89b21fd6fc fix: stop masking failed service deploys; trim dead config
The docker_services and systemd_services roles ran their "start the
service" tasks with `failed_when: false`, so a container or unit that
failed to come up still reported the deploy as green. Drop it from both
start tasks so a broken deploy actually fails CI. The compose/unit *copy*
tasks keep `failed_when: false` — that's load-bearing for the
`item is not failed` filter that skips services without a compose/unit file.

Also:
- Remove a duplicate "Template service .env files" task in docker_services
  (second copy used a hardcoded path and didn't register; first one is the
  one the start task reads).
- Don't trigger a full fleet deploy on docs/markdown/workflow-only pushes
  to main — add docs/**, **/*.md and .github/** to paths-ignore.
- Drop the dangling `update-freebsd` Make target (playbook doesn't exist;
  fleet has no FreeBSD hosts).
2026-06-04 18:37:37 +01:00

37 lines
903 B
Makefile

.PHONY: deploy deploy-check deploy-host update-all update-linux docker-status reboot ping deps
# Full fleet deploy
deploy:
ansible-playbook deploy.yml
# Dry run (check + diff, no changes)
deploy-check:
ansible-playbook deploy.yml --check --diff
# Deploy single host: make deploy-host HOST=helsinki-a
deploy-host:
ansible-playbook deploy.yml --limit $(HOST)
# Update all packages across the fleet
update-all:
ansible-playbook playbooks/update-all.yml
# Update Linux hosts only (apt + apk)
update-linux:
ansible-playbook playbooks/update-linux.yml
# Show Docker container status
docker-status:
ansible-playbook playbooks/docker-status.yml
# Reboot a specific host: make reboot HOST=copenhagen-c
reboot:
ansible-playbook playbooks/reboot.yml --limit $(HOST)
# Ping all hosts
ping:
ansible all -m ping
# Install Ansible Galaxy dependencies
deps:
ansible-galaxy install -r requirements.yml