feat: Update configuration for Nextcloud and Certbot, add image and video organization scripts

This commit is contained in:
2026-01-08 23:39:55 +01:00
parent 3c6647c215
commit 2c8b753393
12 changed files with 440 additions and 19 deletions
@@ -47,6 +47,7 @@ fw_allowed_ports:
- { rule: "allow", port: "8999", proto: "tcp", from: "10.19.4.0/24" } # ComfyUI - SimpleHttpServer (local network)
- { rule: "allow", port: "8012", proto: "tcp", from: "10.19.4.0/24" } # Qwen2 (local network)
- { rule: "allow", port: "8012", proto: "tcp", from: "10.5.5.5/32" } # Qwen2 (Laptop)
- { rule: "allow", port: "9090", proto: "tcp", from: "10.19.4.0/24" } # local network
ufw_outgoing_traffic:
- 22 # SSH
- 53 # DNS
@@ -95,3 +96,13 @@ comfyui_user_pubkey: "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbm
# Kokoro FastAPI settings (we don't set home because it is not expected to use a lot a disk space)
kokoro_user_pubkey: "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAHHOPBR9p9kq5Cqzpe4cr3jHnweaYrHPXv5sXNzt+sCXP54uc5rWUBhxW2OQVvQzJ47dEVhEKi4WSC7LcuKS2G5AQDzWXNiasHvYIYQU3F/EknVCZnsiXYqXphYkJA6rJCNRnISZCIC1mocq6PB7J08ONdRFCvjfUBuVRT8BNGXNmQ/zQ=="
# Let's Encrypt / Certbot
cloudns_auth_id: "{{ lookup('env', 'CLOUDNS_AUTH_ID') }}"
cloudns_auth_password: "{{ lookup('env', 'CLOUDNS_PASSWORD') }}"
cloudns_nameserver: "109.201.133.111"
certbot_email: c.alexandre.pires@alexpires.me
certbot_domains:
- "gpu-01.lab.alexpires.me"
certbot_cockpit_domain: "gpu-01.lab.alexpires.me"
+27 -3
View File
@@ -19,6 +19,23 @@ packages_blocklist:
- yp-tools
- ypbind
misc_modules_blocklist:
- bluetooth
- bnep
- btusb
- can
- cpia2
- firewire-core
- floppy
- ksmbd
- n_hdlc
- net-pf-31
- pcspkr
- soundcore
- usb-midi
- uvcvideo
- v4l2_common
# Users
login_users:
- username: "{{ ansible_user }}"
@@ -106,7 +123,7 @@ virt_vfio_devices:
- { dev: "0000:05:00.0", vendor: "c0a9", device: "5415" } # Micron/Crucial Technology T500 NVMe PCIe SSD
virt_extra_grub_args: >
rd.driver.blacklist=nouveau modprobe.blacklist=nouveau ipv6.disable=1 audit=1 audit_backlog_limit=8192
rd.driver.blacklist=nouveau modprobe.blacklist=nouveau ipv6.disable=1 audit=1 audit_backlog_limit=8192 usbcore.autosuspend=-1
virt_vfio_ids:
- 10de:1430 # NVIDIA Corporation M2000 [Maxwell GM107GL]
@@ -142,6 +159,9 @@ virt_machines:
mac_address: "52:54:00:cd:dd:2d"
block_devs: []
guest_agent: true
virtio_fs:
- source: "/mnt/usb"
target: "usb"
host_devs:
# Micron/Crucial Technology T500 NVMe PCIe SSD
- type: "pci"
@@ -221,6 +241,9 @@ virt_machines:
mac_address: "52:54:00:cd:dd:2e"
block_devs: []
guest_agent: true
virtio_fs:
- source: "/mnt/usb"
target: "usb"
host_devs:
# Micron/Crucial Technology T500 NVMe PCIe SSD
- type: "pci"
@@ -306,8 +329,8 @@ virt_machines:
virtio_fs:
- source: "/mnt/srv"
target: "srv"
- source: "/mnt/storage"
target: "storage"
- source: "/mnt/md0"
target: "md0"
user_data: |
#cloud-config
hostname: dev-01
@@ -336,3 +359,4 @@ cloudns_nameserver: "109.201.133.111"
certbot_email: c.alexandre.pires@alexpires.me
certbot_domains:
- "vh-01.lab.alexpires.me"
certbot_cockpit_domain: "vh-01.lab.alexpires.me"
+33 -2
View File
@@ -18,19 +18,35 @@
ansible.builtin.fail:
msg: "CloudDNS nameserver is not set"
- name: Install Certbot and dependencies
- name: Remove Certbot installed via package manager (Debian/Ubuntu)
when: ansible_os_family == "Debian"
ansible.builtin.apt:
name:
- certbot
state: absent
- name: Remove Certbot installed via package manager (RedHat/CentOS)
when: ansible_os_family == "RedHat"
ansible.builtin.dnf:
name:
- certbot
state: present
state: absent
- name: Install cloudDNS plugin dependencies
ansible.builtin.pip:
name:
- certbot
- certbot-dns-cloudns
state: present
- name: Ensure CloudDNS credentials directory exists
ansible.builtin.file:
path: "/etc/letsencrypt"
state: directory
owner: root
group: root
mode: '0700'
- name: Create ClouDNS credentials file
ansible.builtin.copy:
dest: "{{ cloudns_credentials_path }}"
@@ -59,3 +75,18 @@
job: "certbot renew --quiet"
minute: 0
hour: 3
- name: Setup cockpit certifcate (if defined)
when: certbot_cockpit_domain is defined
block:
- name: Create symlink for Cockpit certificate
ansible.builtin.file:
src: "/etc/letsencrypt/live/{{ certbot_cockpit_domain }}/fullchain.pem"
dest: "/etc/cockpit/ws-certs.d/99-letsencrypt-cert.cert"
state: link
- name: Create symlink for Cockpit private key
ansible.builtin.file:
src: "/etc/letsencrypt/live/{{ certbot_cockpit_domain }}/privkey.pem"
dest: "/etc/cockpit/ws-certs.d/99-letsencrypt-cert.key"
state: link