Browse Source

tasks: Do not use tmpfiles.d, create folders

master
Felix 6 months ago
parent
commit
4cce573f48
  1. 21
      tasks/discosrv.yml
  2. 18
      tasks/relay.yml
  3. 2
      tasks/syncthing-user.yml

21
tasks/discosrv.yml

@ -13,6 +13,19 @@
- install
- discosrv
- name: Configure syncthing discovery server folders
file:
path: "{{ item.path }}"
owner: "{{ syncthing_user }}"
group: "{{ syncthing_user }}"
mode: 0660
recurse: true
loop:
- { path: "/var/lib/syncthing/discosrv" }
tags:
- install
- discosrv
- name: Configure syncthing discovery server
template:
src: "{{item.src}}"
@ -21,14 +34,14 @@
group: root
mode: 0755
loop:
- { src: "syncthing-discosrv-tmpfiles.conf.j2",
dest: "/etc/tmpfiles.d/syncthing-discosrv.conf" }
#- { src: "syncthing-discosrv-tmpfiles.conf.j2",
# dest: "/etc/tmpfiles.d/syncthing-discosrv.conf" }
- { src: "syncthing-discosrv-override.conf.j2",
dest: "/etc/systemd/system/stdiscosrv.service.d/exec-override.conf" }
#- { src: "syncthing-discosrv.service.j2",
# dest: "/etc/systemd/system/syncthing-discosrv.service" }
notify:
"apply systemd-tmpfiles"
#notify:
# "apply systemd-tmpfiles"
tags:
- install
- discosrv

18
tasks/relay.yml

@ -13,6 +13,19 @@
- install
- relay
- name: Configure syncthing relaysrv folders
file:
path: "{{ item.path }}"
owner: "{{ syncthing_user }}"
group: "{{ syncthing_user }}"
mode: 0660
recurse: true
loop:
- { path: "/var/lib/syncthing/relaysrv" }
tags:
- install
- relay
- name: Configure syncthing relay server
template:
src: "{{item.src}}"
@ -21,8 +34,8 @@
group: root
mode: 0755
loop:
- { src: "syncthing-relaysrv-tmpfiles.conf.j2",
dest: "/etc/tmpfiles.d/syncthing-relaysrv.conf" }
#- { src: "syncthing-relaysrv-tmpfiles.conf.j2",
# dest: "/etc/tmpfiles.d/syncthing-relaysrv.conf" }
- { src: syncthing-relaysrv-override.conf.j2,
dest: /etc/systemd/system/strelaysrv.service.d/env-exec-override.conf }
#- { src: syncthing-relaysrv.service.j2,
@ -35,6 +48,7 @@
- name: Run tmpfiles.d
shell: /bin/systemd-tmpfiles --create
ignore_errors: true
tags:
- install
- relay

2
tasks/syncthing-user.yml

@ -55,7 +55,7 @@
- install
- syncthing-user
- name: Set up syncthing config
- name: Set up syncthing configs apart from user xml
copy:
src: "{{playbook_dir}}/../files/roles/syncthing/{{item}}"
dest: "/home/syncthing/.config/syncthing/{{item}}"

Loading…
Cancel
Save