Sync
This commit is contained in:
parent
84e3831640
commit
5220a961a9
4 changed files with 86 additions and 6 deletions
|
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
services:
|
||||||
|
syncthing:
|
||||||
|
image: lscr.io/linuxserver/syncthing:latest
|
||||||
|
container_name: syncthing
|
||||||
|
hostname: syncthing #optional
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=10000
|
||||||
|
- TZ=America/New_York
|
||||||
|
volumes:
|
||||||
|
- /opt/syncthing/config:/config
|
||||||
|
- /opt/syncthing/data1:/data1
|
||||||
|
- /mnt/storage/docker/syncthing/data2:/data2
|
||||||
|
ports:
|
||||||
|
- 8384:8384
|
||||||
|
- 22000:22000/tcp
|
||||||
|
- 22000:22000/udp
|
||||||
|
- 21027:21027/udp
|
||||||
|
restart: unless-stopped
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
---
|
||||||
|
- name: Load distro-specific variables
|
||||||
|
ansible.builtin.include_vars: "{{ item }}"
|
||||||
|
tags: always
|
||||||
|
with_first_found:
|
||||||
|
- files:
|
||||||
|
- "{{ ansible_facts['distribution'] }}.yaml"
|
||||||
|
skip: true
|
||||||
|
|
||||||
|
- name: Ensure syncthing is installed on hosts
|
||||||
|
block:
|
||||||
|
- name: Ensure presense of folders for processes on the server
|
||||||
|
tags: packages,docker,syncthing
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "/opt/syncthing/{{ item }}"
|
||||||
|
state: directory
|
||||||
|
owner: 1000
|
||||||
|
group: 10000
|
||||||
|
recurse: true
|
||||||
|
mode: u=rwx,g=rwx,o=r
|
||||||
|
loop:
|
||||||
|
- data1
|
||||||
|
- config
|
||||||
|
- name: Ensure network folder is available
|
||||||
|
tags: packages,docker,syncthing
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /mnt/storage/docker/syncthing/data2
|
||||||
|
state: directory
|
||||||
|
owner: 1000
|
||||||
|
group: 10000
|
||||||
|
recurse: true
|
||||||
|
mode: u=rwx,g=rwx,o=r
|
||||||
|
- name: Ensure compose file is available on the server
|
||||||
|
tags: packages,docker,syncthing
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: docker-compose.yaml
|
||||||
|
dest: "/opt/syncthing/docker-compose.yaml"
|
||||||
|
owner: 1000
|
||||||
|
group: 1000
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
# - name: Ensure environment variables file is available on the server
|
||||||
|
# tags: packages,docker,syncthing
|
||||||
|
# ansible.builtin.template:
|
||||||
|
# src: syncthing.env.j2
|
||||||
|
# dest: /opt/syncthing/.env
|
||||||
|
# owner: 1000
|
||||||
|
# group: 1000
|
||||||
|
# mode: u=rw,g-rwx,o-rwx
|
||||||
|
- name: Ensure docker containers are pulled and running
|
||||||
|
tags: docker,syncthing
|
||||||
|
community.docker.docker_compose_v2:
|
||||||
|
project_src: "/opt/syncthing"
|
||||||
|
pull: policy
|
||||||
|
|
||||||
|
rescue:
|
||||||
|
- name: Set that this task failed # noqa: var-naming[no-role-prefix]
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
task_failed: true
|
||||||
|
# code: language=ansible
|
||||||
13
minilab.yaml
13
minilab.yaml
|
|
@ -55,14 +55,15 @@
|
||||||
- adhdgirl.minilab.traefik
|
- adhdgirl.minilab.traefik
|
||||||
- adhdgirl.minilab.authentik
|
- adhdgirl.minilab.authentik
|
||||||
- adhdgirl.minilab.arr
|
- adhdgirl.minilab.arr
|
||||||
- adhdgirl.minilab.ntfy
|
|
||||||
- adhdgirl.minilab.cloudflared
|
|
||||||
- adhdgirl.minilab.termix
|
|
||||||
- adhdgirl.minilab.immich
|
|
||||||
- adhdgirl.minilab.readeck
|
|
||||||
- adhdgirl.minilab.calibre
|
- adhdgirl.minilab.calibre
|
||||||
- adhdgirl.minilab.valkey
|
- adhdgirl.minilab.cloudflared
|
||||||
- adhdgirl.minilab.forgejo
|
- adhdgirl.minilab.forgejo
|
||||||
|
- adhdgirl.minilab.immich
|
||||||
|
- adhdgirl.minilab.ntfy
|
||||||
|
- adhdgirl.minilab.readeck
|
||||||
|
- adhdgirl.minilab.syncthing
|
||||||
|
- adhdgirl.minilab.termix
|
||||||
|
- adhdgirl.minilab.valkey
|
||||||
- name: Configure frigate
|
- name: Configure frigate
|
||||||
hosts: curren
|
hosts: curren
|
||||||
tags: docker,frigate
|
tags: docker,frigate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue