clean up ansible script
This commit is contained in:
parent
9edab09330
commit
8e8564216e
7 changed files with 40 additions and 33 deletions
19
roles/syncthing/tasks/main.yml
Normal file
19
roles/syncthing/tasks/main.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
- name: Install Syncthing
|
||||
apt:
|
||||
name: syncthing
|
||||
state: latest
|
||||
update_cache: true
|
||||
- name: Create syncthing user
|
||||
user:
|
||||
name: syncthing
|
||||
home: /home/syncthing
|
||||
state: present
|
||||
- name: Copy Syncthing configuration
|
||||
template:
|
||||
src: "{{ role_path }}/templates/config.xml.j2"
|
||||
dest: /home/syncthing/.config/syncthing/config.xml
|
||||
- name: Enable Syncthing service
|
||||
systemd:
|
||||
name: syncthing@syncthing
|
||||
enabled: true
|
||||
state: restarted
|
Reference in a new issue