Commit d2257be5 authored by godog's avatar godog
Browse files

datasets: disable restore unit when necessary

The unit has an 'Install' section which needs to be undone. Disabling an
unit also takes care of cleaning up the reverse 'Requires' symlinks.
parent cf1c5971
Pipeline #17505 passed with stage
in 5 minutes and 51 seconds
......@@ -87,13 +87,6 @@
mode: 0444
when: dataset_should_restore
- name: Cleanup restore service unit
file:
path: "/etc/systemd/system/restore-{{ dataset_filename }}.service"
state: absent
when: "not dataset_should_restore"
notify: reload systemd
- name: Enable restore service unit
systemd:
name: "restore-{{ dataset_filename }}.service"
......@@ -101,6 +94,19 @@
daemon_reload: yes
when: dataset_should_restore
- name: Disable restore service unit
systemd:
name: "restore-{{ dataset_filename }}.service"
enabled: no
when: not dataset_should_restore
- name: Cleanup restore service unit
file:
path: "/etc/systemd/system/restore-{{ dataset_filename }}.service"
state: absent
when: not dataset_should_restore
notify: reload systemd
- name: Wipe dataset restore guard file
file:
path: "/var/lib/float/datasets/{{ dataset_filename }}.restore_guard"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment