Files
infra/syncthing.yaml
2020-12-02 23:35:47 +03:00

43 lines
1007 B
YAML

- hosts: odroid
become: yes
roles:
- { role: 0x0i.systemd }
vars:
unit_config:
- name: syncthing
Unit:
Description: Syncthing - Open Source Continuous File Synchronization
Documentation: man:syncthing(1)
Wants: syncthing-inotify.service
Service:
ExecStart: /usr/bin/syncthing -home=/mnt/DATA/syncthingRuntime -no-browser -no-restart -logflags=0
User: 'syncthing'
Group: 'syncthing'
Restart: on-failure
SuccessExitStatus: 3 4
RestartForceExitStatus: 3 4
Install:
WantedBy: default.target
tasks:
- name: install packages
apt: name={{ item }} update_cache=yes state=latest
with_items:
- syncthing
- name: group syncthing exists
group:
name: "syncthing"
state: present
- name: user syncthing
user:
name: "syncthing"
group: "syncthing"
append: yes
shell: /bin/bash
state: present