Author SHA1 Message Date
kasun 67addcbe1b bug(roles): create stack directory before copying compose file
Checks / Secret Scan (pull_request) Successful in 5s
Checks / Lint (pull_request) Successful in 21s
The first deployment of a new stack failed because the copy task does not
create the missing destination directory.
2026-11-27 21:29:02 +01:00
claude-bot Bot e654ae3bec Merge pull request 'Feature: Deploy it-tools through Ansible' (#15) from feature/adopt-it-tools-stack into main
Checks / Secret Scan (push) Successful in 5s
Checks / Lint (push) Successful in 22s
2026-11-27 21:10:25 +01:00
kasun 1b25ff1450 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
2026-11-27 21:08:21 +01:00
kasun a23ba7bee8 feature(ci): add manual deploy stacks workflow 2026-11-27 21:08:17 +01:00
kasun 1b05e959e3 feature(stacks): adopt it-tools stack
The image stays on latest with its Watchtower label until there is an
image pinning strategy.
2026-11-27 21:08:13 +01:00
kasun 0289a216ba feature(roles): add docker_stack role 2026-11-27 21:08:10 +01:00
kasun 660765d1c6 chore: pin community.docker and install it in CI
ansible-core ships only ansible.builtin, so ansible-lint cannot resolve
community.docker modules without the collection.
2026-11-27 21:08:07 +01:00
claude-bot Bot 3b5d3b7b17 Merge pull request 'Chore: Add /merge skill with an enforced review gate' (#13) from chore/add-merge-skill into main
Checks / Secret Scan (push) Successful in 6s
Checks / Lint (push) Successful in 9s
2026-11-27 04:01:56 +01:00
8 changed files with 75 additions and 1 deletions

No files matched your search

+3
View File
@@ -48,6 +48,9 @@ jobs:
- name: Install Lint Tools
run: pip install -r requirements-dev.txt
- name: Install Ansible Collections
run: ansible-galaxy collection install -r collections/requirements.yml
- name: Run yamllint
run: yamllint --strict .
+18
View File
@@ -0,0 +1,18 @@
name: Deploy Stacks
on:
workflow_dispatch:
jobs:
deploy-stacks:
name: Deploy Stacks
runs-on: ansible
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ansible Collections
run: ansible-galaxy collection install -r collections/requirements.yml
- name: Run Stacks Playbook
run: ansible-playbook playbooks/docker_stacks.yml --diff
+1 -1
View File
@@ -19,7 +19,7 @@ Branch → PR (lint, secret scan, later `--check --diff`) → merge to protected
- Keep the `/home/pi/docker/<service>/` paths, because Compose derives the project name from the folder.
- Ansible manages config, never data. No ownership changes under `DOCKER_DATA_ROOT` (mapped UIDs).
- When adopting a stack: pin its image, remove its Watchtower label, and require a no-change dry run first.
- When adopting a stack: pin its image and remove its Watchtower label.
- Gitea, its runner and Postgres never auto-deploy. I trigger them from the `ansible` LXC.
## Secrets
+4
View File
@@ -0,0 +1,4 @@
---
collections:
- name: community.docker
version: "5.4.1"
+10
View File
@@ -0,0 +1,10 @@
---
- name: Deploy stacks
hosts: docker_hosts
gather_facts: false
tasks:
- name: Deploy it-tools
ansible.builtin.include_role:
name: docker_stack
vars:
docker_stack_name: it-tools
+3
View File
@@ -0,0 +1,3 @@
---
docker_stack_root: "{{ homelab_stacks_root }}"
docker_stack_name: ""
+24
View File
@@ -0,0 +1,24 @@
---
- name: Require a stack name
ansible.builtin.assert:
that:
- docker_stack_name | length > 0
fail_msg: "docker_stack_name must be set"
quiet: true
- name: Create stack directory for {{ docker_stack_name }}
ansible.builtin.file:
path: "{{ docker_stack_root }}/{{ docker_stack_name }}"
state: directory
mode: "0755"
- name: Copy compose file for {{ docker_stack_name }}
ansible.builtin.copy:
src: "{{ playbook_dir }}/../stacks/{{ docker_stack_name }}/docker-compose.yml"
dest: "{{ docker_stack_root }}/{{ docker_stack_name }}/docker-compose.yml"
mode: "0644"
- name: Start {{ docker_stack_name }}
community.docker.docker_compose_v2:
project_src: "{{ docker_stack_root }}/{{ docker_stack_name }}"
state: present
+12
View File
@@ -0,0 +1,12 @@
services:
it-tools:
image: corentinth/it-tools:latest
ports:
- 8085:80
restart: unless-stopped
container_name: it-tools
labels:
- "com.centurylinklabs.watchtower.enable=true"
environment:
- PUID=1000
- PGID=1000