diff options
author | Christian Pointner <equinox@spreadspace.org> | 2019-09-12 02:17:41 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2019-09-12 02:17:41 +0200 |
commit | 7d470b5563419662c7118f88d3bd8b55cdffc05b (patch) | |
tree | d8288dae9eba5d850a8ae86898b34644c63de3ee /roles/zfs/tasks | |
parent | whitespace cleanup (diff) |
zfs role can now create pools
Diffstat (limited to 'roles/zfs/tasks')
-rw-r--r-- | roles/zfs/tasks/main.yml | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/roles/zfs/tasks/main.yml b/roles/zfs/tasks/main.yml index 5e891e40..cddfbb09 100644 --- a/roles/zfs/tasks/main.yml +++ b/roles/zfs/tasks/main.yml @@ -27,9 +27,7 @@ name: zfsutils-linux state: present -- name: get zfs/zpool state - zpool_facts: - properties: all - -- debug: - var: ansible_zfs_pools +- name: create zpool + command: "zpool create -m {{ zfs_zpool_mountpoint }} {% for prop, value in zfs_zpool_properties.items() %}-o {{ prop }}={{ value }} {% endfor %}{{ zfs_zpool_name }} {{ zfs_zpool_create_vdevs }}" + args: + creates: "{{ zfs_zpool_mountpoint }}" |