ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.92k stars 3.41k forks source link

awxkit: creating a credential requires user, team or org #13864

Open onefourfive opened 1 year ago

onefourfive commented 1 year ago

Please confirm the following

Bug Summary

Per the docs: https://docs.ansible.com/ansible-tower/latest/html/towercli/reference.html#awx-credentials-create

user, team, and organization are not listed as required. This matches the AWX UI behavior-- a resource without user/team/organization is available globally.

However running credentials create without these specified throws an error:

awx credentials create --name 'Vault SSH Sign DE' --credential_type 24
{"detail": ["Missing 'user', 'team', or 'organization'."]}

AWX version

21.9.0

Select the relevant components

Installation method

kubernetes

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

  1. Use the CLI to create a credential without specifying user, team or organization.

Expected results

A globally-available credential is created.

Actual results

An error is returned requiring a user, team, or organization.

Additional information

No response

fosterseth commented 1 year ago

the UI creates the credential with your username as user field, so it is implicitly fulfilling the requirement

the docs could potentially highlight these requirements

onefourfive commented 1 year ago

I wonder if instead, the cli should imply user = $CONTROLLER_USER if not otherwise specified?