Feature: Deploy it-tools through Ansible #15

Merged
claude-bot Bot merged 5 commits from feature/adopt-it-tools-stack into main 2026-11-27 21:10:25 +01:00

First Docker stack managed by Ansible.

  • roles/docker_stack: copies a stack's docker-compose.yml to /home/pi/docker/<service>/ and runs docker compose up through community.docker.docker_compose_v2. Fails early if no stack name is given.
  • stacks/it-tools and playbooks/docker_stacks.yml: adopt it-tools as the first stack. The image stays on latest with its Watchtower label until there is an image pinning strategy.
  • collections/requirements.yml: pins community.docker 5.4.1. CI installs it before linting, because ansible-core ships only ansible.builtin.
  • .gitea/workflows/deploy-stacks.yaml: manual workflow on the ansible runner that installs the pinned collections and runs the playbook with --diff.
  • CLAUDE.md: drop the no-change dry run requirement for adopting a stack.

Nothing deploys on merge. The deploy workflow only runs when triggered by hand.

First Docker stack managed by Ansible. - `roles/docker_stack`: copies a stack's `docker-compose.yml` to `/home/pi/docker/<service>/` and runs `docker compose up` through `community.docker.docker_compose_v2`. Fails early if no stack name is given. - `stacks/it-tools` and `playbooks/docker_stacks.yml`: adopt `it-tools` as the first stack. The image stays on `latest` with its Watchtower label until there is an image pinning strategy. - `collections/requirements.yml`: pins `community.docker` 5.4.1. CI installs it before linting, because `ansible-core` ships only `ansible.builtin`. - `.gitea/workflows/deploy-stacks.yaml`: manual workflow on the `ansible` runner that installs the pinned collections and runs the playbook with `--diff`. - `CLAUDE.md`: drop the no-change dry run requirement for adopting a stack. Nothing deploys on merge. The deploy workflow only runs when triggered by hand.
claude-bot Bot added 5 commits 2026-11-27 21:08:32 +01:00
ansible-core ships only ansible.builtin, so ansible-lint cannot resolve
community.docker modules without the collection.
The image stays on latest with its Watchtower label until there is an
image pinning strategy.
docs: drop the dry run requirement for adopting a stack
Checks / Secret Scan (pull_request) Successful in 6s
Checks / Lint (pull_request) Successful in 20s
1b25ff1450

Review

Effort: medium

  • stacks/it-tools/docker-compose.yml:3: image stays on latest with the Watchtower label, which conflicts with the CLAUDE.md adoption rule. nit (accepted deviation: owner decided on 2026-11-27 to keep both until there is an image pinning strategy; CLAUDE.md not yet updated to say so)
  • .gitea/workflows/deploy-stacks.yaml:4: workflow_dispatch can run from any branch, so unmerged code could deploy. pre-existing (any branch can already target the ansible runner; an if on the ref inside the workflow is bypassable from that same branch; tracked as runner isolation, to be limited before deploy-on-merge)
  • roles/docker_stack/tasks/main.yml:10: copy fails for a stack whose folder doesn't exist on the host yet. nit (adopted stacks already have their folder; needed before the first new stack)
  • roles/docker_stack/tasks/main.yml:15: no health check after docker_compose_v2. nit (planned step after adoption)
  • .gitea/workflows/deploy-stacks.yaml:7: no concurrency guard against two parallel manual runs. nit
  • stacks/it-tools/docker-compose.yml:10: PUID/PGID are likely ignored by this image. nit (kept identical to the live file)

Dropped: missing --check dry run (owner decision, CLAUDE.md updated in this PR) and the playbook_dir-based source path (owner decision: playbooks always live in playbooks/).

<!-- claude-review: pass 1b25ff14500bd7329d463fee1fe5f7072fe571b0 --> ## Review Effort: medium - `stacks/it-tools/docker-compose.yml:3`: image stays on `latest` with the Watchtower label, which conflicts with the CLAUDE.md adoption rule. nit (accepted deviation: owner decided on 2026-11-27 to keep both until there is an image pinning strategy; CLAUDE.md not yet updated to say so) - `.gitea/workflows/deploy-stacks.yaml:4`: `workflow_dispatch` can run from any branch, so unmerged code could deploy. pre-existing (any branch can already target the `ansible` runner; an `if` on the ref inside the workflow is bypassable from that same branch; tracked as runner isolation, to be limited before deploy-on-merge) - `roles/docker_stack/tasks/main.yml:10`: copy fails for a stack whose folder doesn't exist on the host yet. nit (adopted stacks already have their folder; needed before the first new stack) - `roles/docker_stack/tasks/main.yml:15`: no health check after `docker_compose_v2`. nit (planned step after adoption) - `.gitea/workflows/deploy-stacks.yaml:7`: no concurrency guard against two parallel manual runs. nit - `stacks/it-tools/docker-compose.yml:10`: `PUID`/`PGID` are likely ignored by this image. nit (kept identical to the live file) Dropped: missing `--check` dry run (owner decision, CLAUDE.md updated in this PR) and the `playbook_dir`-based source path (owner decision: playbooks always live in `playbooks/`).
claude-bot Bot merged commit e654ae3bec into main 2026-11-27 21:10:25 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kasun/homelab-ansible#15