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

Indicate tower_cli.cfg can also be in current directory #15092

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

jpmens
Copy link
Contributor

@jpmens jpmens commented Apr 10, 2024

SUMMARY

The tower_cli.cfg file is also found in current directory.

ISSUE TYPE
  • Docs Fix
COMPONENT NAME
  • Docs

@github-actions github-actions bot added component:awx_collection issues related to the collection for controlling AWX community labels Apr 10, 2024
@@ -54,6 +54,7 @@ These can be specified via (from highest to lowest precedence):
- direct module parameters
- environment variables (most useful when running against localhost)
- a config file path specified by the `tower_config_file` parameter
- a config file at `./tower_cli.cfg`, i.e. in the current directory
Copy link
Member

Choose a reason for hiding this comment

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

looking at the code more carefully, it looks like we walk the local directory and check for a tower_cli.cfg file there

for example, if my local directory is /home/sbf/awx, the code will check for
/home/tower_cli.cfg
/home/sbf/tower_cli.cfg
/home/sbf/awx/tower_cli.cfg

with the last one being highest priority

It looks like we never updated these docs to reflect that behavior though

https://github.com/fosterseth/awx/blob/69102cf26565ea6930a28965746831f3cfa08a69/awx_collection/plugins/module_utils/controller_api.py#L170

maybe we can point that out here?

```
host: https://localhost:8043
verify_ssl: true
oauth_token: LEdCpKVKc4znzffcpQL5vLG8oyeku6
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
oauth_token: LEdCpKVKc4znzffcpQL5vLG8oyeku6
oauth_token: <token>

leaving a real looking credential here might trip secret scanners

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.

None yet

3 participants