summaryrefslogtreecommitdiff
path: root/roles/zfs
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-09-10 04:03:35 +0200
committerChristian Pointner <equinox@spreadspace.org>2019-09-10 04:03:35 +0200
commit546b19cb98fa3030a393c9ba82ef69c69f33c584 (patch)
tree8be8895e64617cd420de0648c772c3e502deb15b /roles/zfs
parentadded zfs role (diff)
fix zfs role
Diffstat (limited to 'roles/zfs')
-rw-r--r--roles/zfs/tasks/main.yml25
1 files changed, 17 insertions, 8 deletions
diff --git a/roles/zfs/tasks/main.yml b/roles/zfs/tasks/main.yml
index 478a25dd..5e891e40 100644
--- a/roles/zfs/tasks/main.yml
+++ b/roles/zfs/tasks/main.yml
@@ -3,9 +3,7 @@
- name: install zfs packages
apt:
- name:
- - zfs-dkms
- - zfsutils-linux
+ name: zfs-dkms
state: present
- name: check if module is available for the currently running kernel
@@ -19,8 +17,19 @@
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
+- name: load zfs kernel module
+ modprobe:
+ name: zfs
+ state: present
+
+- name: install zfs file system utilities
+ apt:
+ name: zfsutils-linux
+ state: present
+
+- name: get zfs/zpool state
+ zpool_facts:
+ properties: all
+
+- debug:
+ var: ansible_zfs_pools