ansible/awx

AWX Collection Credential Delete

Open

#14.209 aperta il 6 lug 2023

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)Python (3333 fork)batch import
Hacktoberfestcomponent:awx_collectiongood first issuehelp wanted

Metriche repository

Star
 (13.071 star)
Metriche merge PR
 (Merge medio 24g 6h) (30 PR mergiate in 30 g)

Descrizione

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

When deleting a credential from the awx.awx collection the credential_type is currently a required parameter but no error is thrown if its missing.

However, it should not be a requirement at all in some cases. For example, if we are passing in an ID or a named URL (once https://github.com/ansible/awx/pull/14205 merges) then the credential type would be irrelevant as we would find a unique credential. The module should be rewritten to be able to delete a credential from just the name field.

We should also update the unit test files to include a test of just deleting by name or named URL.

AWX version

latest

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

N/A

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

Write a playbook to create a credential and then attempt to delete the credential with just name set to either ID or named URL and state: absent. Run the playbook, it should fail to delete the credential.

Expected results

Credential should be deleted.

Actual results

Failed step from the playbook.

Additional information

No response

Guida contributor