diff options
Diffstat (limited to 'roles/zfs/base/tasks/main.yml')
-rw-r--r-- | roles/zfs/base/tasks/main.yml | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/roles/zfs/base/tasks/main.yml b/roles/zfs/base/tasks/main.yml index ec1b04bf..e86b974b 100644 --- a/roles/zfs/base/tasks/main.yml +++ b/roles/zfs/base/tasks/main.yml @@ -7,7 +7,7 @@ options zfs zfs_arc_max={{ zfs_arc_size.max }} dest: /etc/modprobe.d/zfs.conf -- name: install zfs modules and utilities +- name: install zfs modules include_tasks: "{{ ansible_distribution }}.yml" - name: load zfs kernel module @@ -15,6 +15,33 @@ name: zfs state: present +- name: install zed and zfs file system utilities + apt: + name: + - zfsutils-linux + - zfs-zed + state: present + +- name: enable zfs-list-cacher zlet for systemd zfs-mount-generator + 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 + - name: create zpools loop: "{{ zfs_zpools | dict2items }}" loop_control: |