diff options
author | Jeroen Geusebroek <me@jeroengeusebroek.nl> | 2016-01-03 21:09:37 +0100 |
---|---|---|
committer | Jeroen Geusebroek <me@jeroengeusebroek.nl> | 2016-01-03 21:09:37 +0100 |
commit | 3647b29bee6a6216ea1a01c433bb55da66888be6 (patch) | |
tree | 557454cf432452094aade4c67314a0cd98519551 /system | |
parent | 30c5b303ced99c80bdaa5e8bc4771c5762c83a55 (diff) | |
download | ansible-modules-extras-3647b29bee6a6216ea1a01c433bb55da66888be6.tar.gz |
Improved fix for #1074. Both None and '' transform to fqdn.
Diffstat (limited to 'system')
-rw-r--r-- | system/gluster_volume.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/gluster_volume.py b/system/gluster_volume.py index ea74c25f..10d50c34 100644 --- a/system/gluster_volume.py +++ b/system/gluster_volume.py @@ -350,10 +350,10 @@ def main(): # Clean up if last element is empty. Consider that yml can look like this: # cluster="{% for host in groups['glusterfs'] %}{{ hostvars[host]['private_ip'] }},{% endfor %}" - if cluster != None and cluster[-1] == '': + if cluster != None and len(cluster) > 1 and cluster[-1] == '': cluster = cluster[0:-1] - if cluster == None: + if cluster == None or cluster[0] == '': cluster = [myhostname] if brick_paths != None and "," in brick_paths: |