From b8050e12969989b23348b00820531f89b0439867 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Fri, 12 Mar 2021 20:53:56 +0100 Subject: [PATCH] Remove password requirement when creating lxc containers (#1999) (#2012) * Removed requirement for password * Updated documentation for password * Adding changelog fragment * Update changelogs/fragments/1999-proxmox-fix-issue-1955.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein (cherry picked from commit 4676ca584b0552d9695bacaa445a5fdd7194f2d8) Co-authored-by: Ajpantuso --- changelogs/fragments/1999-proxmox-fix-issue-1955.yml | 3 +++ plugins/modules/cloud/misc/proxmox.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/1999-proxmox-fix-issue-1955.yml diff --git a/changelogs/fragments/1999-proxmox-fix-issue-1955.yml b/changelogs/fragments/1999-proxmox-fix-issue-1955.yml new file mode 100644 index 00000000000..274e70fb0fd --- /dev/null +++ b/changelogs/fragments/1999-proxmox-fix-issue-1955.yml @@ -0,0 +1,3 @@ +--- +bugfixes: +- proxmox - removed requirement that root password is provided when containter state is ``present`` (https://github.com/ansible-collections/community.general/pull/1999). diff --git a/plugins/modules/cloud/misc/proxmox.py b/plugins/modules/cloud/misc/proxmox.py index 553b4ebe804..3cf03eaa458 100644 --- a/plugins/modules/cloud/misc/proxmox.py +++ b/plugins/modules/cloud/misc/proxmox.py @@ -63,7 +63,6 @@ password: description: - the instance root password - - required only for C(state=present) type: str hostname: description: @@ -538,7 +537,7 @@ def main(): hookscript=dict(type='str'), proxmox_default_behavior=dict(type='str', choices=['compatibility', 'no_defaults']), ), - required_if=[('state', 'present', ['node', 'hostname', 'password', 'ostemplate'])], + required_if=[('state', 'present', ['node', 'hostname', 'ostemplate'])], required_together=[('api_token_id', 'api_token_secret')], required_one_of=[('api_password', 'api_token_id')], )