mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 05:59:28 -02:30
accept old env vars
this broke our build of the cli docs
This commit is contained in:
committed by
Shane McDonald
parent
bb3fc3caa8
commit
11e416995a
@@ -43,9 +43,13 @@ def render():
|
|||||||
# The return value of this function is an argparse.ArgumentParser, which
|
# The return value of this function is an argparse.ArgumentParser, which
|
||||||
# the sphinxcontrib.autoprogram plugin crawls and generates an indexed
|
# the sphinxcontrib.autoprogram plugin crawls and generates an indexed
|
||||||
# Sphinx document from.
|
# Sphinx document from.
|
||||||
for e in ('CONTROLLER_HOST', 'CONTROLLER_USERNAME', 'CONTROLLER_PASSWORD'):
|
for e in (
|
||||||
if not os.environ.get(e):
|
('CONTROLLER_HOST', 'TOWER_HOST'),
|
||||||
raise SystemExit('Please specify a valid {} for a real (running) installation.'.format(e)) # noqa
|
('CONTROLLER_USERNAME', 'TOWER_USERNAME'),
|
||||||
|
('CONTROLLER_PASSWORD', 'TOWER_PASSWORD'),
|
||||||
|
):
|
||||||
|
if not os.environ.get(e[0]) and not os.environ.get(e[1]):
|
||||||
|
raise SystemExit('Please specify a valid {} for a real (running) installation.'.format(e[0])) # noqa
|
||||||
cli = CLI()
|
cli = CLI()
|
||||||
cli.parse_args(['awx', '--help'])
|
cli.parse_args(['awx', '--help'])
|
||||||
cli.connect()
|
cli.connect()
|
||||||
|
|||||||
Reference in New Issue
Block a user