Open luckylittle opened 4 years ago
Found this issue when I was looking for the same functionality. The solution is found in config.py. If you set AWXKIT_CREDENTIAL_FILE to point to a file containing your username and password it is read when you execute the awx cli utility.
export AWXKIT_CREDENTIAL_FILE=/home/awx/credentials.yaml
Once that is set you can use awx like this:
awx --conf.host https://fqdn login
Example credentials.yaml file:
default:
username: admin
password: p@ssw0rd
Interesting to see not a lot of requests/activity in this RFE. I still want to draw attention that it would actually be really helpfull to have.
With sunsetting of tower-cli/awx-cli this simple and powerful option of having a configuration file was lost.
Previously configuration was stored in ~/.tower-cli.cfg
/~/.awx-cli.cfg
ISSUE TYPE
SUMMARY
The previous version of
tower-cli
stored credentials and other configuration in~/.tower-cli.cfg
by default. From my understanding, the replacement toolawx
does not have anything like it (e.g. you need to export TOKEN and ingest this TOKEN to all of the subsequent commands).ENVIRONMENT
3.6.2
2.9.1
STEPS TO REPRODUCE
awx login -k --conf.host https://<IP_ADDRESS> --conf.username <ADMIN> --conf.password <PASSWORD> -v
awx config
EXPECTED RESULTS
Previous command
1.
stores the credentials andverify_ssl false
to the local config file somewhere. Command2.
will then display this previously stored information.ACTUAL RESULTS
"Empty" config is returned:
ADDITIONAL INFORMATION
Customer is asking why this functionality was removed.