diff --git a/roles/arch/handlers/main.yml b/roles/arch/handlers/main.yml index 08c99f9..2b06a54 100644 --- a/roles/arch/handlers/main.yml +++ b/roles/arch/handlers/main.yml @@ -1,38 +1,45 @@ - name: enable daily timer - become: yes + become: true systemd: name: daily.timer state: restarted - enabled: yes - daemon-reload: yes + enabled: true + daemon-reload: true - name: enable weekly timer - become: yes + become: true systemd: name: weekly.timer state: restarted - enabled: yes - daemon-reload: yes + enabled: true + daemon-reload: true # started by weekly timer - name: disable reflector - become: yes + become: true systemd: name: reflector state: stopped - enabled: no + enabled: false - name: restart vpn - become: yes + become: true systemd: name: openvpn-client@zeus state: restarted - enabled: yes + enabled: true - name: restart user ssh-agent systemd: name: ssh-agent state: restarted - enabled: yes - daemon-reload: yes + enabled: true + daemon-reload: true + scope: user + +- name: restart syncthing + systemd: + name: syncthing + state: restarted + enabled: true scope: user diff --git a/roles/arch/tasks/main.yml b/roles/arch/tasks/main.yml index 163ae4b..6769f88 100644 --- a/roles/arch/tasks/main.yml +++ b/roles/arch/tasks/main.yml @@ -52,6 +52,6 @@ - include_tasks: mpv.yml - include_tasks: mpd.yml - include_tasks: postgres.yml # TODO -- include_tasks: syncthing.yml # TODO depending on platform +- include_tasks: syncthing.yml # TODO (laptop) - include_tasks: openvpn.yml # TODO (laptop) - include_tasks: timer.yml diff --git a/roles/arch/tasks/syncthing.yml b/roles/arch/tasks/syncthing.yml index e69de29..c45e0cc 100644 --- a/roles/arch/tasks/syncthing.yml +++ b/roles/arch/tasks/syncthing.yml @@ -0,0 +1,11 @@ +- name: create configuration dir + file: + path: "{{ xdg_config_dir }}/syncthing" + state: directory + +- name: copy configuration file + template: + src: "{{ platform }}/syncthing.j2" + dest: "{{ xdg_config_dir }}/syncthing/config.xml" + mode: "0600" + notify: restart syncthing diff --git a/roles/arch/templates/desktop/syncthing.j2 b/roles/arch/templates/desktop/syncthing.j2 new file mode 100644 index 0000000..dba711e --- /dev/null +++ b/roles/arch/templates/desktop/syncthing.j2 @@ -0,0 +1,134 @@ + + + + + basic + + + 0 + + 3600 + + 0 + 0 + 0 + random + false + 0 + 0 + 10 + false + false + false + 25 + .stfolder + false + 0 + 0 + false + standard + standard + false + true + + + basic + + + 0 + + + 3600 + + 0 + 0 + 0 + random + false + 0 + 0 + -1 + false + false + false + 25 + .stfolder + false + 0 + 0 + false + standard + standard + false + true + + +
dynamic
+ false + false + 0 + 0 + 0 +
+ +
tcp://10.8.0.1:22000
+ false + false + 0 + 0 + 0 +
+ +
127.0.0.1:8384
+ Qo5fAhxR7LnwvJ7eGYr4gigkHm2LrT6y + dark +
+ + + default + default + true + true + 21027 + [ff12::8384]:21027 + 0 + 0 + 60 + true + 10 + true + true + 60 + 30 + 10 + 3 + 0 + rxdDP3h2 + https://data.syncthing.net/newdata + false + 1800 + true + 12 + false + 24 + false + 5 + false + 1 + https://upgrades.syncthing.net/meta.json + false + 10 + authenticationUserAndPassword + 0 + ~ + true + 0 + https://crash.syncthing.net/newcrash + true + 180 + 20 + default + auto + 0 + +