This repository has been archived on 2024-04-30. You can view files and clone it, but cannot push or open issues or pull requests.
setup/roles/syncthing/tasks/main.yml

27 lines
697 B
YAML
Raw Normal View History

2022-12-15 19:58:13 +00:00
- name: Install Syncthing
become: true
apt:
2022-12-19 22:27:26 +00:00
name: syncthing
2022-12-15 19:58:13 +00:00
- name: Create Syncthing configuration directory
file:
path: ~/.config/syncthing
state: directory
- name: Copy Syncthing configuration
template:
src: "{{ role_path }}/templates/config.xml.j2"
2022-12-15 19:58:13 +00:00
dest: ~/.config/syncthing/config.xml
- name: Copy Syncthing private key
copy:
src: "{{ role_path }}/files/key.pem"
dest: ~/.config/syncthing/key.pem
- name: Copy Syncthing certificate
copy:
src: "{{ role_path }}/files/cert.pem"
dest: ~/.config/syncthing/cert.pem
2022-12-15 21:39:05 +00:00
- name: Enable Syncthing
become: true
systemd:
enabled: true
name: "syncthing@{{ ansible_user_id }}"
state: restarted