From 29790df583ff5b7c6d0487bde57e27e37e9c423f Mon Sep 17 00:00:00 2001 From: Sergei Antipov Date: Mon, 22 May 2023 00:32:26 -0400 Subject: [PATCH] Don't require api_password when api_token_id is used in proxmox_tasks_info (#6554) * Don't require api_password when api_token_id is used in proxmox_tasks_info * Add changelog fragment * Fix casing. --------- Co-authored-by: Felix Fontein --- .../6554-proxmox-tasks-info-fix-required-password.yaml | 3 +++ plugins/modules/proxmox_tasks_info.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/6554-proxmox-tasks-info-fix-required-password.yaml diff --git a/changelogs/fragments/6554-proxmox-tasks-info-fix-required-password.yaml b/changelogs/fragments/6554-proxmox-tasks-info-fix-required-password.yaml new file mode 100644 index 0000000000..6edfa475c1 --- /dev/null +++ b/changelogs/fragments/6554-proxmox-tasks-info-fix-required-password.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: + - proxmox_tasks_info - remove ``api_user`` + ``api_password`` constraint from ``required_together`` as it causes to require ``api_password`` even when API token param is used (https://github.com/ansible-collections/community.general/issues/6201). diff --git a/plugins/modules/proxmox_tasks_info.py b/plugins/modules/proxmox_tasks_info.py index 183fb3bf0f..a2e66b38dc 100644 --- a/plugins/modules/proxmox_tasks_info.py +++ b/plugins/modules/proxmox_tasks_info.py @@ -160,8 +160,7 @@ def main(): module = AnsibleModule( argument_spec=module_args, - required_together=[('api_token_id', 'api_token_secret'), - ('api_user', 'api_password')], + required_together=[('api_token_id', 'api_token_secret')], required_one_of=[('api_password', 'api_token_id')], supports_check_mode=True) result = dict(changed=False)