aboutsummaryrefslogtreecommitdiffstats
path: root/roles/_workstation/syncthing/tasks/main.yml
blob: 45a97a21b9363807882834715ff2f7f2411feb0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---

- name: install syncthing
  ansible.builtin.package:
    name: syncthing
    state: present

- name: get syncthing user id
  ansible.builtin.getent:
    database: passwd

- name: enable and start syncthing
  ansible.builtin.systemd:
    name: syncthing
    state: started
    enabled: true
    scope: user
  environment:
    XDG_RUNTIME_DIR: "/run/user/{{ ansible_facts.getent_passwd[syncthing_workstation_user][1] }}"
  become: true
  become_user: "{{ dotfiles_workstation_user }}"
remember that computers suck.