This commit is contained in:
3
main.yml
3
main.yml
@@ -70,6 +70,9 @@
|
|||||||
- name: Deploy Monitoring Stack
|
- name: Deploy Monitoring Stack
|
||||||
import_tasks: tasks/monitoring.yml
|
import_tasks: tasks/monitoring.yml
|
||||||
tags: monitoring_deploy
|
tags: monitoring_deploy
|
||||||
|
- name: Deploy Syncthing
|
||||||
|
import_tasks: tasks/syncthing.yml
|
||||||
|
tags: syncthing_deploy
|
||||||
|
|
||||||
- hosts: jackson
|
- hosts: jackson
|
||||||
|
|
||||||
|
21
tasks/syncthing.yml
Normal file
21
tasks/syncthing.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
- name: Create folder structure
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
with_items:
|
||||||
|
- "{{ data_dir }}/syncthing"
|
||||||
|
|
||||||
|
- name: Deploy Syncthing Docker Container
|
||||||
|
docker_container:
|
||||||
|
name: syncthing
|
||||||
|
image: lscr.io/linuxserver/syncthing:latest
|
||||||
|
recreate: true
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
networks:
|
||||||
|
- name: homelab
|
||||||
|
env:
|
||||||
|
PUID: "{{ PUID }}"
|
||||||
|
PGID: "{{ PGID }}"
|
||||||
|
TZ: "{{ TZ }}"
|
||||||
|
volumes:
|
||||||
|
- "{{ data_dir }}/syncthing:/config"
|
||||||
|
- "{{ SYNCTHING_DATA_PATH }}:/data"
|
Reference in New Issue
Block a user