From f41199feae553f0d2269f507382a82470277c8ae Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 9 Sep 2019 21:53:08 +0200 Subject: added zfs role --- roles/zfs/tasks/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 roles/zfs/tasks/main.yml (limited to 'roles/zfs/tasks/main.yml') diff --git a/roles/zfs/tasks/main.yml b/roles/zfs/tasks/main.yml new file mode 100644 index 00000000..478a25dd --- /dev/null +++ b/roles/zfs/tasks/main.yml @@ -0,0 +1,26 @@ +--- +## TODO: @debian: make sure contrib repo is added + +- name: install zfs packages + apt: + name: + - zfs-dkms + - zfsutils-linux + state: present + +- name: check if module is available for the currently running kernel + command: modprobe --dry-run zfs + check_mode: no + register: zfs_module_available + failed_when: false + changed_when: false + +- name: rebuild zfs module + when: zfs_module_available.rc != 0 + command: dpkg-reconfigure zfs-dkms + +- name: check again if module is available for the currently running kernel + when: zfs_module_available.rc != 0 + command: modprobe --dry-run zfs + check_mode: no + changed_when: false -- cgit v1.2.3