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

feat: Update collection arguments #15627

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

sean-m-sullivan
Copy link
Contributor

@sean-m-sullivan sean-m-sullivan commented Nov 10, 2024

SUMMARY

Update the injectors for the AAP credential type to work across collections

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • Collection
AWX VERSION
24.6.1
ADDITIONAL INFORMATION

Related PR's:

@github-actions github-actions bot added component:awx_collection issues related to the collection for controlling AWX community labels Nov 10, 2024
@sean-m-sullivan sean-m-sullivan changed the title update collection arguments feat: Update collection arguments Nov 10, 2024
@AlanCoding
Copy link
Member

Consistency is the most important thing for this. What other content is using these connection parameters? This?

https://galaxy.ansible.com/ui/repo/published/infra/aap_configuration/docs/

@sean-m-sullivan
Copy link
Contributor Author

Consistency is the most important thing for this. What other content is using these connection parameters? This?

https://galaxy.ansible.com/ui/repo/published/infra/aap_configuration/docs/

This is the primary thing using it at the moment, and the installer using it as well, it was more Some Variables should be exposed to playbooks for use, lets set a standard.

@AlanCoding
Copy link
Member

Looking good 👍

I got some more background on this initiative. It looks like you've already taken the lead in proposing these changes elsewhere. I fully support this, but want to wait a few days to assure we've solidified consensus.

@AlanCoding
Copy link
Member

I'm actually not convinced this will work anymore. I expect that if the collection receives AAP_HOSTNAME then in that scenario specifically, it needs to append to use /api/controller/ as opposed to /api/. I don't see that.

I could test this manually to clarify specifically how it's not working, but there's no automated tests we can rely on right now.

@AlanCoding
Copy link
Member

ansible/event-driven-ansible#347

The PR you created here is for the collection. There may be a needed change to eda-server as well.

https://github.com/ansible/eda-server/blob/ac4be90e413196e922bd255a04589711b25b818e/src/aap_eda/core/management/commands/create_initial_data.py#L302-L315

This is probably more consequential, since this is a credential type used in-app, most similar to the awx_plugins change you are making. At some point we hope to essentially merge the 2 CredentialType models, but we are not there yet, so the controller type is more-or-less duplicated in both places.

@sean-m-sullivan
Copy link
Contributor Author

It may be needed, didn't know it was there will look and add that to the list

ansible/event-driven-ansible#347

The PR you created here is for the collection. There may be a needed change to eda-server as well.

https://github.com/ansible/eda-server/blob/ac4be90e413196e922bd255a04589711b25b818e/src/aap_eda/core/management/commands/create_initial_data.py#L302-L315

This is probably more consequential, since this is a credential type used in-app, most similar to the awx_plugins change you are making. At some point we hope to essentially merge the 2 CredentialType models, but we are not there yet, so the controller type is more-or-less duplicated in both places.

- If value not set, will try environment variable C(CONTROLLER_OAUTH_TOKEN) and then config files
type: raw
version_added: "3.7.0"
aliases: [ tower_oauthtoken, aap_token ]
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer for the main name to be aap_token, otherwise looks alright.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

- If value not set, will try environment variable C(CONTROLLER_OAUTH_TOKEN) and then config files
type: raw
version_added: "3.7.0"
aliases: [ tower_oauthtoken, controller_oauthtoken]
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this still make sense?

Copy link
Member

Choose a reason for hiding this comment

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

agree, I think this is okay if it has no aliases, due to other recent changes

collection_name: 'awx.awx'
version: '4.0.0'
why: Collection name change
alternatives: 'TOWER_OAUTH_TOKEN, AAP_TOKEN'
Copy link
Contributor

@PabloHiro PabloHiro Dec 11, 2024

Choose a reason for hiding this comment

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

Same with this. Not sure how to handle this so it is clear that OAUTH is coming from the Resource Server but is not available in Controller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community component:awx_collection issues related to the collection for controlling AWX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants