diff --git a/inventories/z9/host_vars/opensourcetorrents.sops.yaml b/inventories/z9/host_vars/opensourcetorrents.sops.yaml index 1be84039..e7d56e32 100644 --- a/inventories/z9/host_vars/opensourcetorrents.sops.yaml +++ b/inventories/z9/host_vars/opensourcetorrents.sops.yaml @@ -1,7 +1,8 @@ ansible_pull__age_private_key: ENC[AES256_GCM,data:QB0xpxP8pLfE2ExpCRD4joQzoEcbQZTiVEJbX3t9GyFEseZUtnUCO0ysFUc6hRs2BC9hoPXz6k/dZ0vNkniBmqcN5zTofZ8bg94=,iv:3NVVsae+pgbriTNzgT6rGCEzJjw368WgAKfQCi2qsmQ=,tag:AQSIxJCZOZ8dtlvcu4WMuw==,type:str] +transmission__rpc_password: ENC[AES256_GCM,data:PPEIdI/OcuvX8Mh+zNFSOw==,iv:AgHwT6FGmE9sY3H+MQQc291ILbpNKatEoK8W09wrtr4=,tag:M1E0iS8TTNvu2MABboqCSQ==,type:str] sops: - lastmodified: "2026-06-01T19:05:50Z" - mac: ENC[AES256_GCM,data:ms4yaDEY/2DxC56rxagBRgfkHuy2/AGhZ0om3+gTVfG8/1p7v+qWXuWrNlDjefjhLKVCaf5yl749JZIjs8PP6rTKyTcteqVfoKwx+CFaEA9OmPOaENBV8Kpy2Rrkw8J4UBBKSoTKGFDAGtyysmqbS8eqDuEpb/TbfbbybJUNfe4=,iv:g4IHNmQELptweaqRE7P3LlBTwV+7jt6AfrPowzuziv4=,tag:YkBnOJA5IN1xDhI+umYSow==,type:str] + lastmodified: "2026-06-28T11:50:14Z" + mac: ENC[AES256_GCM,data:c03dDTwriK3lk9HYK5h85ESxC3nvVjBZVIva1ZAbeFu1n8u1IfazBS3NN4NSEZ+TkSW1WdQVKXFiQ9WBawLwLzXSKcmxaOPZuIvxcmbsYGuHAMpO1ODNgvuPP6D6vFl/C+Ew0yRVd72MqlvQKrg46+x6uD+1cvi9w30+EkzV+UY=,iv:UlSDF/0aF0dWYaQc9KAv3pXE1DUflQfFrHIlSt5stJU=,tag:Uj0W//Du0TOugByNFHFf9g==,type:str] pgp: - created_at: "2026-06-01T19:05:22Z" enc: |- @@ -177,4 +178,4 @@ sops: -----END PGP MESSAGE----- fp: 41FFAF3D519CF5C039FBD8414BCC213729AF0E49 unencrypted_suffix: _unencrypted - version: 3.12.2 + version: 3.13.1 diff --git a/inventories/z9/host_vars/opensourcetorrents.yaml b/inventories/z9/host_vars/opensourcetorrents.yaml index 6bcc86d4..0df26e64 100644 --- a/inventories/z9/host_vars/opensourcetorrents.yaml +++ b/inventories/z9/host_vars/opensourcetorrents.yaml @@ -1 +1,93 @@ # add /etc/transmission-remote/settings.json here +transmission__settings: + alt-speed-down: 50 + alt-speed-enabled: false + alt-speed-time-begin: 540 + alt-speed-time-day: 127 + alt-speed-time-enabled: false + alt-speed-time-end: 1020 + alt-speed-up: 50 + announce-ip: "" + announce-ip-enabled: false + anti-brute-force-enabled: false + anti-brute-force-threshold: 100 + bind-address-ipv4: "" + bind-address-ipv6: "" + blocklist-enabled: false + blocklist-url: http://www.example.com/blocklist + cache-size-mb: 4 + default-trackers: "" + dht-enabled: true + download-dir: /torrents/complete + download-limit: 100 + download-limit-enabled: 0 + download-queue-enabled: true + download-queue-size: 5 + encryption: 1 + idle-seeding-limit: 30 + idle-seeding-limit-enabled: false + incomplete-dir: /torrents/incomplete + incomplete-dir-enabled: true + lpd-enabled: true + max-peers-global: 200 + message-level: 2 + peer-congestion-algorithm: "" + peer-limit-global: 200 + peer-limit-per-torrent: 50 + peer-port: 51413 + peer-port-random-high: 65535 + peer-port-random-low: 49152 + peer-port-random-on-start: false + peer-socket-tos: le + pex-enabled: true + pidfile: "" + port-forwarding-enabled: false + preallocation: 1 + preferred_transport: utp + proxy_url: "" + queue-stalled-enabled: true + queue-stalled-minutes: 30 + ratio-limit: 2 + ratio-limit-enabled: false + rename-partial-files: true + reqq: 2000 + rpc-authentication-required: false + rpc-bind-address: 0.0.0.0 + rpc-enabled: true + rpc-host-whitelist: "" + rpc-host-whitelist-enabled: true + rpc-password: '{{ transmission__rpc_password }}' + rpc-port: 9091 + rpc-socket-mode: "0750" + rpc-url: /transmission/ + rpc-username: "" + rpc-whitelist: 127.0.0.1,::1,172.31.200.*,172.31.201.*,213.240.180.39,2a01:170:118b::1 + rpc-whitelist-enabled: true + scrape-paused-torrents-enabled: true + script-torrent-added-enabled: false + script-torrent-added-filename: "" + script-torrent-done-enabled: false + script-torrent-done-filename: "" + script-torrent-done-seeding-enabled: false + script-torrent-done-seeding-filename: "" + seed-queue-enabled: false + seed-queue-size: 10 + sequential_download: false + sleep-per-seconds-during-verify: 100 + speed-limit-down: 100 + speed-limit-down-enabled: false + speed-limit-up: 100 + speed-limit-up-enabled: false + start-added-torrents: true + start_paused: false + tcp-enabled: true + torrent-added-verify-mode: fast + trash-original-torrent-files: false + umask: "022" + upload-limit: 100 + upload-limit-enabled: 0 + upload-slots-per-torrent: 8 + utp-enabled: true + watch-dir: /torrents/torrents + watch-dir-enabled: true + watch-dir-force-generic: false diff --git a/inventories/z9/hosts.yaml b/inventories/z9/hosts.yaml index 09899d49..38e29fd6 100644 --- a/inventories/z9/hosts.yaml +++ b/inventories/z9/hosts.yaml @@ -44,6 +44,9 @@ nginx_hosts: ola_hosts: hosts: light: +transmission: + hosts: + opensourcetorrents: proxmox_vm_template_hosts: hosts: thinkcccore0: diff --git a/playbooks/deploy.yaml b/playbooks/deploy.yaml index 737aa4f2..7a144409 100644 --- a/playbooks/deploy.yaml +++ b/playbooks/deploy.yaml @@ -163,3 +163,10 @@ - knot tags: - knot + +- name: Setup transmission + hosts: transmission + roles: + - transmission + tags: + - transmission diff --git a/resources/chaosknoten/auth-dns/zones/ccchh.net.zone b/resources/chaosknoten/auth-dns/zones/ccchh.net.zone index 2a69ea88..f598988f 100644 --- a/resources/chaosknoten/auth-dns/zones/ccchh.net.zone +++ b/resources/chaosknoten/auth-dns/zones/ccchh.net.zone @@ -46,7 +46,10 @@ unifi A 10.89.213.21 ; ; Club-Services ; -xr18 A 172.31.200.21 +xr18 A 172.31.200.29 +dooris A 172.31.200.16 + AAAA 2a07:c481:1:d0::1c +hmdooris-ccu A 172.31.200.17 ;club-assistant AAAA 2a07:c481:1:d0::a ;;_acme-challenge.club-assistant CNAME d50ad73a-f82d-4244-87f0-6f5195b37d21.auth.acmedns.hamburg.ccc.de @@ -56,9 +59,7 @@ xr18 A 172.31.200.21 ;_acme-challenge.light CNAME e59f55ee-9013-469d-a146-a159721b6fea.auth.acmedns.hamburg.ccc.de. ;light-werkstatt AAAA 2a07:c481:1:d0::16 ;_acme-challenge.light-werkstatt CNAME f408acc0-d9f5-4525-bb01-28938e3bb7d0.auth.acmedns.hamburg.ccc.de. -;hmdooris-ccu A 10.31.208.202 ;buba A 10.31.211.137 -;dooris AAAA 2a07:c481:1:d0::1c ;_acme-challenge.dooris CNAME 37caae1f-b77f-4eb1-aa71-dc3f7ed24360.auth.acmedns.hamburg.ccc.de. ;yate A 10.31.208.12 ;staubiv2 A 10.31.210.233 diff --git a/resources/chaosknoten/keycloak/docker_compose/compose.yaml.j2 b/resources/chaosknoten/keycloak/docker_compose/compose.yaml.j2 index 8db3526f..75c94e04 100644 --- a/resources/chaosknoten/keycloak/docker_compose/compose.yaml.j2 +++ b/resources/chaosknoten/keycloak/docker_compose/compose.yaml.j2 @@ -22,7 +22,7 @@ services: keycloak: - image: git.hamburg.ccc.de/ccchh/oci-images/keycloak:26.6.0 + image: git.hamburg.ccc.de/ccchh/oci-images/keycloak:26.6.3 pull_policy: always restart: unless-stopped command: start --optimized diff --git a/resources/z9/dooris/docker_compose/compose.yaml.j2 b/resources/z9/dooris/docker_compose/compose.yaml.j2 index d16c8ad7..e81b2335 100644 --- a/resources/z9/dooris/docker_compose/compose.yaml.j2 +++ b/resources/z9/dooris/docker_compose/compose.yaml.j2 @@ -10,5 +10,8 @@ services: DOORIS_BASE_URL: https://dooris.ccchh.net DOORIS_CCUJACK_USER: "dooris" DOORIS_CCUJACK_PASSWORD: "{{ secret__dooris_ccujack_password }}" + DOORIS_AUTHORIZED_KEYS_FILE: "/srv/state/dooris_authorized_keys" network_mode: host restart: unless-stopped + volumes: + - "./state:/srv/state/:rw" diff --git a/roles/transmission/files/update-transmission-settings b/roles/transmission/files/update-transmission-settings new file mode 100644 index 00000000..d51730ae --- /dev/null +++ b/roles/transmission/files/update-transmission-settings @@ -0,0 +1,13 @@ +#!/bin/sh + +# +# Update the transmission settings.json. For the update, stop transmission, +# put the new file in place, and restart it. +# + +set -e + +systemctl stop transmission-daemon +cp /etc/transmission-daemon/settings-ansible.json /etc/transmission-daemon/settings.json +chmod 0660 /etc/transmission-daemon/settings.json +systemctl start transmission-daemon diff --git a/roles/transmission/handlers/main.yaml b/roles/transmission/handlers/main.yaml new file mode 100644 index 00000000..781f442a --- /dev/null +++ b/roles/transmission/handlers/main.yaml @@ -0,0 +1,3 @@ +- name: update transmission settings + ansible.builtin.command: /usr/local/sbin/update-transmission-settings + become: true diff --git a/roles/transmission/tasks/main.yaml b/roles/transmission/tasks/main.yaml new file mode 100644 index 00000000..f927ef62 --- /dev/null +++ b/roles/transmission/tasks/main.yaml @@ -0,0 +1,23 @@ +- name: ensure transmission-daemon is installed + ansible.builtin.apt: + name: transmission-daemon + state: present + become: true +- name: ensure update-transmission-settings is deployed + ansible.builtin.copy: + src: "update-transmission-settings" + dest: "/usr/local/sbin/update-transmission-settings" + owner: root + group: root + mode: "0750" + become: true + notify: update transmission settings +- name: ensure transmission settings are deployed + ansible.builtin.copy: + content: '{{ transmission__settings | to_json(indent=4, sort_keys=True) }}' + dest: "/etc/transmission-daemon/settings-ansible.json" + owner: debian-transmission + group: debian-transmission + mode: "0750" + become: true + notify: update transmission settings