From 431c11bee393c31e3280ff4b92d0f2a1792fc0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 17 Dec 2022 17:02:56 +0100 Subject: feat(roles/_workstation): add syncthing role --- roles/_workstation/syncthing/tasks/main.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 roles/_workstation/syncthing/tasks/main.yml (limited to 'roles/_workstation/syncthing/tasks') diff --git a/roles/_workstation/syncthing/tasks/main.yml b/roles/_workstation/syncthing/tasks/main.yml new file mode 100644 index 0000000..45a97a2 --- /dev/null +++ b/roles/_workstation/syncthing/tasks/main.yml @@ -0,0 +1,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 }}" -- cgit v1.2.3