This repository has been archived on 2020-08-22. You can view files and clone it, but cannot push or open issues or pull requests.
ansible/seedbox.yml

49 lines
2.5 KiB
YAML
Raw Normal View History

---
- hosts: seedbox
vars:
2020-05-27 17:38:21 +00:00
apt:
packages:
- { package: "transmission-daemon", state: present }
- { package: "git", state: present }
- { package: "make", state: present }
- { package: "gcc", state: present }
systemd:
services:
- { name: "darkhttpd", enabled: true, action: restarted }
- { name: "transmission-daemon", enabled: true, action: restarted }
- { name: "sshd", enabled: true, action: restarted }
overrides:
- "transmission-daemon"
file:
- { path: "/etc/ssh/authorized_keys", owner: "root", group: "root", mode: "655", state: directory }
- { path: "{{ transmission.root_dir }}/downloads", owner: "root", group: "root", mode: "755", state: directory }
- { path: "{{ transmission.root_dir }}/.config", owner: "root", group: "root", mode: "600", state: directory}
darkhttpd:
port: "{{ global.seedbox.darkhttpd.port }}"
path: "/etc/darkhttpd" # Where to build and run the daemon from
servepath: "{{ transmission.root_dir }}/downloads"
transmission:
peer:
host:
ipv4: "0.0.0.0"
ipv6: "::"
port: 51413
rpc:
host: "{{ ansible_ens10.ipv4.address }}"
port: "{{ global.seedbox.transmission.port }}"
root_dir: "/mnt/seedbox" # TODO: Use device UUIDs
blacklist: "https://github.com/sahsu/transmission-blocklist/releases/download/1.0.3/blocklist.gz"
sftp_chroot:
- { user: "seedbox",
home: "{{ transmission.root_dir }}/downloads",
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsD58tySBudDE7dw4aDttDv7rLWCqZ2c6N+GnrbSzqAxTcMxxn3GZeozXuz4pkl8NrGEKFk22AlB1hUl0gqnpAr0roL72mXE1WmjVc4EvEVYXLdHnm+rEi/FqvEK8D5mj1vs/ALGqtKGmY1363a8JRR7jSlBa45HkdC7IyJP0stpIkcriPS4kj/lEW0+J5KZ4NuKocjTbyVDoX67fLwBeu/YG4pz0ETKKU1/5xfBN+AxeD8brWvMMwrQzqJoAoRfLKCuD2yTSTPxek/Oa3lbNLUBF6o114gyxsc7zAWMpyNCPvstZoLCdQYqZ0sqVvcFGt0vmlrCtcQozkDVChz1E3 none"
}
roles:
- apt
- darkhttpd
- file
- transmission
- sftp-chroot
- systemd