mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #3549 from arsatiki/patch-2
Fix ZFS module issues with spaces in property values
This commit is contained in:
commit
1fec79ab9d
1 changed files with 5 additions and 7 deletions
|
@ -292,11 +292,9 @@ class Zfs(object):
|
|||
if self.module.check_mode:
|
||||
self.changed = True
|
||||
return
|
||||
cmd = [self.module.get_bin_path('zfs', True)]
|
||||
cmd.append('set')
|
||||
cmd.append(prop + '=' + value)
|
||||
cmd.append(self.name)
|
||||
(rc, err, out) = self.module.run_command(' '.join(cmd))
|
||||
cmd = self.module.get_bin_path('zfs', True)
|
||||
args = [cmd, 'set', prop + '=' + value, self.name]
|
||||
(rc, err, out) = self.module.run_command(args)
|
||||
if rc == 0:
|
||||
self.changed = True
|
||||
else:
|
||||
|
@ -316,9 +314,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
|
||||
|
||||
|
|
Loading…
Reference in a new issue