Role service-fastd: configure systemd service unit overrides instead of replacing the whole file

This commit is contained in:
Tobias Hachmer 2018-02-05 15:46:56 +01:00
parent 3e311bd995
commit 95140f12ea
2 changed files with 11 additions and 9 deletions

View file

@ -12,10 +12,18 @@
name: fastd name: fastd
masked: yes masked: yes
- name: write systemd unit fastd@.service - name: create systemd override dir for fastd@.service
file:
path: /etc/systemd/system/fastd@.service.d
state: directory
owner: root
group: root
mode: 0755
- name: configure systemd unit overrides
template: template:
src: fastd@.service.j2 src: fastd@_service_overrides.j2
dest: /etc/systemd/system/fastd@.service dest: /etc/systemd/system/fastd@.service.d/override.conf
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644

View file

@ -1,11 +1,5 @@
[Unit] [Unit]
Description=Fast and Secure Tunnelling Daemon (connection %i) Description=Fast and Secure Tunnelling Daemon (connection %i)
After=network.target
[Service] [Service]
Type=notify
ExecStart=/usr/bin/fastd --syslog-level info --syslog-ident fastd@%i -c /etc/fastd/%i/fastd.conf ExecStart=/usr/bin/fastd --syslog-level info --syslog-ident fastd@%i -c /etc/fastd/%i/fastd.conf
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target