Commit fff3c51f authored by Julien Cigar's avatar Julien Cigar 🤘
Browse files

add support for present/absent

parent 890bd9ea
......@@ -2,6 +2,7 @@
{% for zfs_dataset in zfs.get('fs', ()) %}
zfs_dataset_{{ loop.index0 }}:
{% if zfs_dataset.present|default(True) %}
zfs.filesystem_present:
- name: {{ zfs_dataset.dataset }}
{%- if zfs_dataset.get('properties') %}
......@@ -12,4 +13,8 @@ zfs_dataset_{{ loop.index0 }}:
- require:
- zfs: zfs_dataset_{{ loop.index0 - 1 }}
{%- endif %}
{% else %}
zfs.filesystem.absent:
- name: {{ zfs_dataset.dataset }}
{% endif %}
{% endfor %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment