Compatibility with salt 2017.7 and newer
Fixes: #20
diff --git a/glusterfs/server/setup.sls b/glusterfs/server/setup.sls
index a3df44a..1db37a3 100644
--- a/glusterfs/server/setup.sls
+++ b/glusterfs/server/setup.sls
@@ -54,7 +54,14 @@
{%- else %}
glusterfs_vol_{{ name }}:
+ {%- if grains['saltversioninfo'][0] < 2017 or
+ (grains['saltversioninfo'][0] == 2017 and grains['saltversioninfo'][1] < 7) %}
+ {# glusterfs.created is renamed to glusterfs.volume_present in salt 2017.7
+ so maintain backward compatibility #}
glusterfs.created:
+ {%- else %}
+ glusterfs.volume_present:
+ {%- endif %}
- name: {{ name }}
{%- if volume.replica is defined %}
- replica: {{ volume.replica }}