summaryrefslogtreecommitdiff
path: root/roles/zfs/base/tasks/enable-systemd-mount-generator.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/zfs/base/tasks/enable-systemd-mount-generator.yml')
-rw-r--r--roles/zfs/base/tasks/enable-systemd-mount-generator.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/roles/zfs/base/tasks/enable-systemd-mount-generator.yml b/roles/zfs/base/tasks/enable-systemd-mount-generator.yml
new file mode 100644
index 00000000..abefbeb1
--- /dev/null
+++ b/roles/zfs/base/tasks/enable-systemd-mount-generator.yml
@@ -0,0 +1,23 @@
+---
+- name: enable zfs-list-cacher zlet
+ file:
+ src: /usr/lib/zfs-linux/zed.d/history_event-zfs-list-cacher.sh
+ dest: /etc/zfs/zed.d/history_event-zfs-list-cacher.sh
+ state: link
+
+- name: create base-directory for zfs-list.cache
+ file:
+ path: /etc/zfs/zfs-list.cache/
+ state: directory
+
+- name: create zfs-list.cache file for zpools
+ loop: "{{ zfs_zpools | dict2items }}"
+ loop_control:
+ label: "{{ item.key }}"
+ copy:
+ content: ""
+ dest: "/etc/zfs/zfs-list.cache/{{ item.key }}"
+ force: no
+
+## TODO: if this is installed after the zpool has already been created zed needs to be triggered
+## using someing like: zfs set canmount=on DATASET