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

only set param features when variable is not empty (#1763)

* only set param features when variable is not empty

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Topper Harly <topperharly@gmx.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
topperharly 2021-02-10 22:07:27 +01:00 committed by GitHub
parent 93e0aa7557
commit 562ff7efb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -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).

View file

@ -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'])