diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2020-11-03 03:15:10 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2020-11-03 03:37:11 +0100 |
commit | ead9aaa3dd7ca48012b2b21cc930ee73c8eaa9d3 (patch) | |
tree | b656f589d1ff4d4b0d245afad3d8d22ce5e65368 /roles/bacula-sd/tasks | |
parent | 24616de43c39da3fe7efd72426fce078a3afdaea (diff) |
Bacula: refactor systemd service files.
Use unit overrides on top of upstream's service files instead of
overriding entire service files. In particular, upstream uses flag `-P`
so we don't need to use RuntimeDirectory= anymore.
Diffstat (limited to 'roles/bacula-sd/tasks')
-rw-r--r-- | roles/bacula-sd/tasks/main.yml | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/roles/bacula-sd/tasks/main.yml b/roles/bacula-sd/tasks/main.yml index 93958a8..f30fe7f 100644 --- a/roles/bacula-sd/tasks/main.yml +++ b/roles/bacula-sd/tasks/main.yml @@ -1,7 +1,7 @@ - name: Install bacula-sd apt: pkg=bacula-sd -# Create with: +# Populate with: # echo $director-dir $(pwgen -sn 64 1) | sudo tee -a /etc/bacula/passwords-sd - name: Ensure /etc/bacula/passwords-sd exists file: path=/etc/bacula/passwords-sd @@ -17,9 +17,15 @@ notify: - Restart bacula-sd -- name: Copy bacula-sd.service - copy: src=etc/systemd/system/bacula-sd.service - dest=/etc/systemd/system/bacula-sd.service +- name: Create /etc/systemd/system/bacula-sd.service.d + file: path=/etc/systemd/system/bacula-sd.service.d + state=directory + owner=root group=root + mode=0755 + +- name: Copy bacula-sd.service override + copy: src=etc/systemd/system/bacula-sd.service.d/override.conf + dest=/etc/systemd/system/bacula-sd.service.d/override.conf owner=root group=root mode=0644 notify: |