diff --git a/changelogs/fragments/816-only-invocate-feature-when-variable-is-set.yml b/changelogs/fragments/816-only-invocate-feature-when-variable-is-set.yml new file mode 100644 index 0000000000..7d48c77298 --- /dev/null +++ b/changelogs/fragments/816-only-invocate-feature-when-variable-is-set.yml @@ -0,0 +1,2 @@ +bugfixes: + - proxmox lxc - only add the features flag when module parameter ``features`` is set. Before an empty string was send to proxmox in case the parameter was not used, which required to use ``root@pam`` for module execution (https://github.com/ansible-collections/community.general/pull/1763). diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index d3cfda3d92..c4cfd9b5e7 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -622,7 +622,7 @@ def main(): searchdomain=module.params['searchdomain'], force=int(module.params['force']), pubkey=module.params['pubkey'], - features=",".join(module.params['features'] or []), + features=",".join(module.params['features']) if module.params['features'] is not None else None, unprivileged=int(module.params['unprivileged']), description=module.params['description'], hookscript=module.params['hookscript'])