From eb3381c60ef68d634c52c29799eaef5f80ef8289 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 10 Jun 2021 11:00:05 +0200 Subject: [PATCH] Update to 2021-06-10 11:00 --- roles/zfs/tasks/install_Debian.yml | 11 ++++++++++- roles/zfs/tasks/main.yml | 12 ++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/roles/zfs/tasks/install_Debian.yml b/roles/zfs/tasks/install_Debian.yml index dd24b88..0775765 100644 --- a/roles/zfs/tasks/install_Debian.yml +++ b/roles/zfs/tasks/install_Debian.yml @@ -23,8 +23,17 @@ notify: restart sanoid tags: zfs +- name: Remove sanoid-prune dependency + file: path=/etc/systemd/system/sanoid.service.wants/sanoid-prune.service state=absent + register: zfs_sanoid_prune + tags: zfs + +- name: Disable cronjob + copy: content='# Cron job disabled, service is managed by a systemd timer' dest=/etc/cron.d/sanoid + tags: zfs + - name: Reload systemd systemd: daemon_reload=True - when: zfs_sanoid_units.results | selectattr('changed','equalto',True) | list | length > 0 + when: zfs_sanoid_units.results | selectattr('changed','equalto',True) | list | length > 0 or zfs_sanoid_prune.changed tags: zfs diff --git a/roles/zfs/tasks/main.yml b/roles/zfs/tasks/main.yml index a995e68..8337fc7 100644 --- a/roles/zfs/tasks/main.yml +++ b/roles/zfs/tasks/main.yml @@ -136,8 +136,16 @@ - ['scrub', 'trim'] tags: zfs -- name: Install bash completion support +- name: Fetch bash_completion support get_url: url: https://raw.githubusercontent.com/openzfs/zfs/master/contrib/bash_completion.d/zfs.in - dest: /etc/bash_completion.d/zfs + dest: /tmp/zfs_bash_completion tags: zfs + +- name: Install bash_completion + shell: sed -e 's/@sbindir@/\/sbin/' /tmp/zfs_bash_completion > /etc/bash_completion.d/zfs + args: + warn: False + changed_when: False + tags: zfs +