From 6252f3bded14e25c16d19c191e7f33366a241d80 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 29 May 2022 07:59:03 +0200 Subject: [PATCH] Fix quoting bug in zfs. (#4726) (#4744) (cherry picked from commit 01b32fec14316dd1785938796d04df6ac75570eb) Co-authored-by: Felix Fontein --- changelogs/fragments/4726-zfs.yml | 2 ++ plugins/modules/storage/zfs/zfs.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/4726-zfs.yml diff --git a/changelogs/fragments/4726-zfs.yml b/changelogs/fragments/4726-zfs.yml new file mode 100644 index 0000000000..c785e2ba11 --- /dev/null +++ b/changelogs/fragments/4726-zfs.yml @@ -0,0 +1,2 @@ +bugfixes: + - "zfs - fix wrong quoting of properties (https://github.com/ansible-collections/community.general/issues/4707, https://github.com/ansible-collections/community.general/pull/4726)." diff --git a/plugins/modules/storage/zfs/zfs.py b/plugins/modules/storage/zfs/zfs.py index e206a8f7ba..ca15893f19 100644 --- a/plugins/modules/storage/zfs/zfs.py +++ b/plugins/modules/storage/zfs/zfs.py @@ -160,7 +160,7 @@ class Zfs(object): elif prop == 'volblocksize': cmd += ['-b', value] else: - cmd += ['-o', '%s="%s"' % (prop, value)] + cmd += ['-o', '%s=%s' % (prop, value)] if origin and action == 'clone': cmd.append(origin) cmd.append(self.name)