Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require api_password when api_token_id is used in proxmox_tasks_info #6554

Conversation

UnderGreen
Copy link
Contributor

@UnderGreen UnderGreen commented May 21, 2023

SUMMARY

Fixes #6201.

As api_user is always required then using it in required_together constraint leads to unwanted behavior when api_password is also always needed.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

proxmox_tasks_info

ADDITIONAL INFORMATION

Output Before the change

fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_host": "localhost",
            "api_password": null,
            "api_token_id": "root-token",
            "api_token_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_user": "root@pam",
            "node": "pve",
            "task": null,
            "validate_certs": false
        }
    },
    "msg": "parameters are required together: api_user, api_password"
}

Output After

ok: [localhost] => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_host": "localhost",
            "api_password": null,
            "api_token_id": "root-token",
            "api_token_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_user": "root@pam",
            "node": "pve",
            "task": null,
            "validate_certs": false
        }
    },
    "proxmox_tasks": []
}

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) small_patch Hopefully easy to review labels May 21, 2023
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-6 labels May 21, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Could you please add a changelog fragment? Thanks.

@ansibullbot ansibullbot removed the small_patch Hopefully easy to review label May 22, 2023
@UnderGreen
Copy link
Contributor Author

@felixfontein done. Let me know if I need to add anything else!

@felixfontein felixfontein merged commit 29790df into ansible-collections:main May 22, 2023
@patchback
Copy link

patchback bot commented May 22, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/29790df583ff5b7c6d0487bde57e27e37e9c423f/pr-6554

Backported as #6561

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label May 22, 2023
patchback bot pushed a commit that referenced this pull request May 22, 2023
…_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 <[email protected]>
(cherry picked from commit 29790df)
@patchback
Copy link

patchback bot commented May 22, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/29790df583ff5b7c6d0487bde57e27e37e9c423f/pr-6554

Backported as #6562

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@UnderGreen thanks a lot for your contribution!

patchback bot pushed a commit that referenced this pull request May 22, 2023
…_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 <[email protected]>
(cherry picked from commit 29790df)
felixfontein pushed a commit that referenced this pull request May 22, 2023
…n api_token_id is used in proxmox_tasks_info (#6561)

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 <[email protected]>
(cherry picked from commit 29790df)

Co-authored-by: Sergei Antipov <[email protected]>
felixfontein pushed a commit that referenced this pull request May 22, 2023
…n api_token_id is used in proxmox_tasks_info (#6562)

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 <[email protected]>
(cherry picked from commit 29790df)

Co-authored-by: Sergei Antipov <[email protected]>
@UnderGreen UnderGreen deleted the fix/proxmox-task-info-required-auth branch May 22, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxmox_task_info api_password required along with api_user
3 participants