Commit 00fb0535 authored by ale's avatar ale
Browse files

Merge branch 'disable-restore-service' into 'master'

datasets: disable restore unit when necessary

See merge request !213
parents e14adac6 d2257be5
Pipeline #17509 passed with stage
in 7 minutes and 31 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