mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
set default credentials when cred file not provided
This commit is contained in:
parent
858f43fd2a
commit
94d6fcbe39
@ -60,13 +60,17 @@ def main():
|
||||
if akit_args.credential_file != utils.not_provided:
|
||||
config.credentials = utils.load_credentials(
|
||||
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:
|
||||
config.project_urls = utils.load_projects(
|
||||
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
|
||||
root = api.Api()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user