diff --git a/tasks/lxc_cache_create.yml b/tasks/lxc_cache_create.yml index 0d20fd13..8fe3f140 100644 --- a/tasks/lxc_cache_create.yml +++ b/tasks/lxc_cache_create.yml @@ -107,3 +107,19 @@ - lxc_container_backing_store == 'lvm' - lxc_container_backing_method is defined - lxc_container_backing_method == 'copy-on-write' + +- name: Create base container to use for ZFS-backed containers + lxc_container: + name: "{{ lxc_container_base_name }}" + template: "download" + state: stopped + backing_store: "zfs" + zfs_root: "{{ lxc_container_zfs_root_name }}" + template_options: "{{ lxc_cache_download_template_options }}" + register: cache_download + retries: 3 + delay: 10 + until: cache_download|success + when: + - lxc_container_backing_store is defined + - lxc_container_backing_store == 'zfs'