1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix zfs property parsing

Current property parser breaks when values contain spaces. Since
zfs get -H returns tab separated lines,  it is better to explicitly
split on tabs than on whitespace.
This commit is contained in:
Antti Rasinen 2013-07-16 13:49:19 +03:00
parent fa9635478b
commit 7670572578

View file

@ -316,9 +316,9 @@ class Zfs(object):
cmd.append('get -H all')
cmd.append(self.name)
rc, out, err = self.module.run_command(' '.join(cmd))
properties=dict()
properties = dict()
for l in out.splitlines():
p, v = l.split()[1:3]
p, v = l.split('\t')[1:3]
properties[p] = v
return properties