mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 04:47:44 -02:30
set default credentials when cred file not provided
This commit is contained in:
@@ -60,13 +60,17 @@ def main():
|
|||||||
if akit_args.credential_file != utils.not_provided:
|
if akit_args.credential_file != utils.not_provided:
|
||||||
config.credentials = utils.load_credentials(
|
config.credentials = utils.load_credentials(
|
||||||
akit_args.credential_file)
|
akit_args.credential_file)
|
||||||
|
else:
|
||||||
|
config.credentials = utils.PseudoNamespace({
|
||||||
|
'default': {
|
||||||
|
'username': os.getenv('AWXKIT_USER', 'admin'),
|
||||||
|
'password': os.getenv('AWXKIT_USER_PASSWORD', 'password')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
if akit_args.project_file != utils.not_provided:
|
if akit_args.project_file != utils.not_provided:
|
||||||
config.project_urls = utils.load_projects(
|
config.project_urls = utils.load_projects(
|
||||||
akit_args.project_file)
|
akit_args.project_file)
|
||||||
else:
|
|
||||||
config.credentials = utils.PseudoNamespace({'default': {'username': os.getenv(
|
|
||||||
'AWXKIT_USER', 'admin'), 'password': os.getenv('AWXKIT_USER_PASSWORD', 'password')}})
|
|
||||||
|
|
||||||
global root
|
global root
|
||||||
root = api.Api()
|
root = api.Api()
|
||||||
|
|||||||
Reference in New Issue
Block a user