diff --git a/roles/syncthing/defaults/main.yml b/roles/syncthing/defaults/main.yml index 3c88839d..7f77e86e 100644 --- a/roles/syncthing/defaults/main.yml +++ b/roles/syncthing/defaults/main.yml @@ -12,6 +12,10 @@ syncthing_data_directory: "{{ samba_shares_root }}/syncthing" syncthing_volumes: - "{{ syncthing_data_directory }}:/var/syncthing/" +syncthing_user_id: "0" +syncthing_group_id: "0" + + # network syncthing_port: 8384 syncthing_hostname: syncthing diff --git a/roles/syncthing/tasks/main.yml b/roles/syncthing/tasks/main.yml index dfe14fe6..aa9183cd 100644 --- a/roles/syncthing/tasks/main.yml +++ b/roles/syncthing/tasks/main.yml @@ -11,7 +11,13 @@ name: syncthing image: syncthing/syncthing:latest pull: true - network_mode: host + ports: + - "8384:8384" + - "22000:22000/tcp" + - "22000:22000/udp" + env: + PUID: "{{ syncthing_user_id }}" + PGID: "{{ syncthing_group_id }}" volumes: "{{ syncthing_volumes }}" restart_policy: unless-stopped memory: "{{ syncthing_memory }}"