- Quote file modes. Unquoted 644/755 were read as decimal, so files landed as 1204. Templates holding secrets are now 0640 root:docker. - Stop publishing Authentik 9000/9443 and Karakeep 3000 (Caddy reaches them over the docker network), bind dir2opds to the Tailscale IP, and drop Caddy's unused 8448. - Atuin login uses no_log and only runs once; the installer only runs when Atuin is missing. - Make chsh, ufw-docker install, the bat symlink and Atuin dotfiles idempotent. - Back up the Paperless data volume (SQLite DB), stopping Paperless during the backup. - Close public sign-up on kosync and ByteStash. - Replace hardcoded IPs and domains with variables. - Remove teardown tasks and templates for 9 retired services. - Fix the dockcheck comment: it auto-updates labelled containers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
97 lines
2.3 KiB
YAML
97 lines
2.3 KiB
YAML
- name: Install required system packages
|
|
apt:
|
|
pkg:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- curl
|
|
- software-properties-common
|
|
- python3-pip
|
|
- virtualenv
|
|
- python3-setuptools
|
|
- duf
|
|
state: latest
|
|
update_cache: true
|
|
|
|
- name: setup shell
|
|
import_tasks: shell.yml
|
|
|
|
- name: Add Docker GPG apt Key
|
|
apt_key:
|
|
url: https://download.docker.com/linux/ubuntu/gpg
|
|
state: present
|
|
|
|
- name: Add Docker Repository
|
|
apt_repository:
|
|
repo: deb https://download.docker.com/linux/debian bookworm stable
|
|
state: present
|
|
|
|
- name: Update apt and install docker-ce
|
|
apt:
|
|
name: docker-ce
|
|
state: latest
|
|
update_cache: true
|
|
|
|
- name: copy over ufw-docker.sh
|
|
ansible.builtin.copy:
|
|
src: ufw-docker.sh
|
|
dest: /usr/local/bin/ufw-docker.sh
|
|
owner: root
|
|
mode: '0755'
|
|
|
|
- name: check ufw-docker rules
|
|
ansible.builtin.command: /usr/local/bin/ufw-docker.sh check
|
|
register: ufw_docker_check
|
|
changed_when: false
|
|
failed_when: false
|
|
check_mode: false
|
|
|
|
- name: install ufw-docker rules
|
|
ansible.builtin.command: /usr/local/bin/ufw-docker.sh install
|
|
when: ufw_docker_check.rc != 0
|
|
|
|
# ufw-docker install asks for a ufw restart to load the new rules
|
|
- name: restart ufw after ufw-docker install
|
|
ansible.builtin.systemd:
|
|
name: ufw
|
|
state: restarted
|
|
when: ufw_docker_check.rc != 0
|
|
|
|
- name: make directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
loop:
|
|
- /opt/stacks
|
|
- /opt/dockge
|
|
|
|
- name: template dockge compose file
|
|
ansible.builtin.template:
|
|
src: dockge-compose.yml.j2
|
|
dest: /opt/dockge/dockge.yml
|
|
owner: root
|
|
mode: '0644'
|
|
|
|
# Deploy services by category for better organization and dependency management
|
|
- name: Deploy infrastructure services
|
|
import_tasks: infrastructure/main.yml
|
|
tags: [infrastructure, services]
|
|
|
|
- name: Deploy development services
|
|
import_tasks: development/main.yml
|
|
tags: [development, services]
|
|
|
|
- name: Deploy media services
|
|
import_tasks: media/main.yml
|
|
tags: [media, services]
|
|
|
|
- name: Deploy productivity services
|
|
import_tasks: productivity/main.yml
|
|
tags: [productivity, services]
|
|
|
|
- name: Deploy monitoring services
|
|
import_tasks: monitoring/main.yml
|
|
tags: [monitoring, services]
|
|
|
|
- name: Deploy communication services
|
|
import_tasks: communication/main.yml
|
|
tags: [communication, services] |