mirror of
https://github.com/ansible/awx.git
synced 2026-01-26 16:11:30 -03:30
restructure so the -q is actually completely quiet
This commit is contained in:
parent
550ab82f63
commit
bd2da80cea
@ -37,12 +37,10 @@ class Command(BaseCommand):
|
|||||||
results["job_templates"] = jts
|
results["job_templates"] = jts
|
||||||
results["projects"] = proj
|
results["projects"] = proj
|
||||||
results["inventory_sources"] = invsrc
|
results["inventory_sources"] = invsrc
|
||||||
print('\n', '# {}'.format("Virtual environments associations:"))
|
|
||||||
print(yaml.dump(results))
|
|
||||||
|
|
||||||
if not options.get('q'):
|
if not options.get('q'):
|
||||||
msg = [
|
msg = [
|
||||||
'',
|
'# Virtual Environments Associations:',
|
||||||
|
yaml.dump(results),
|
||||||
'- To list all (now deprecated) custom virtual environments run:',
|
'- To list all (now deprecated) custom virtual environments run:',
|
||||||
'awx-manage list_custom_venvs',
|
'awx-manage list_custom_venvs',
|
||||||
'',
|
'',
|
||||||
@ -53,6 +51,8 @@ class Command(BaseCommand):
|
|||||||
'',
|
'',
|
||||||
]
|
]
|
||||||
print('\n'.join(msg))
|
print('\n'.join(msg))
|
||||||
|
else:
|
||||||
|
print(yaml.dump(results))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print('\n', '# Incorrect path, verify your path is from the following list:')
|
print('\n', '# Incorrect path, verify your path is from the following list:')
|
||||||
|
|||||||
@ -26,10 +26,10 @@ class Command(BaseCommand):
|
|||||||
if path[0] in all_venvs:
|
if path[0] in all_venvs:
|
||||||
pip_data = get_custom_venv_pip_freeze(options.get('path')[0])
|
pip_data = get_custom_venv_pip_freeze(options.get('path')[0])
|
||||||
if pip_data:
|
if pip_data:
|
||||||
print('\n', '# {}'.format("Virtual environment contents:"))
|
|
||||||
print(pip_data)
|
|
||||||
if not options.get('q'):
|
if not options.get('q'):
|
||||||
msg = [
|
msg = [
|
||||||
|
'# Virtual environment contents:',
|
||||||
|
pip_data,
|
||||||
'- To list all (now deprecated) custom virtual environments run:',
|
'- To list all (now deprecated) custom virtual environments run:',
|
||||||
'awx-manage list_custom_venvs',
|
'awx-manage list_custom_venvs',
|
||||||
'',
|
'',
|
||||||
@ -40,6 +40,8 @@ class Command(BaseCommand):
|
|||||||
'',
|
'',
|
||||||
]
|
]
|
||||||
print('\n'.join(msg))
|
print('\n'.join(msg))
|
||||||
|
else:
|
||||||
|
print(pip_data)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print('\n', '# Incorrect path, verify your path is from the following list:')
|
print('\n', '# Incorrect path, verify your path is from the following list:')
|
||||||
|
|||||||
@ -17,10 +17,11 @@ class Command(BaseCommand):
|
|||||||
super(Command, self).__init__()
|
super(Command, self).__init__()
|
||||||
venvs = get_custom_venv_choices()
|
venvs = get_custom_venv_choices()
|
||||||
if venvs:
|
if venvs:
|
||||||
print('\n', '# {}'.format("Discovered virtual environments:"))
|
|
||||||
print('\n'.join(venvs), '\n')
|
|
||||||
if not options.get('q'):
|
if not options.get('q'):
|
||||||
msg = [
|
msg = [
|
||||||
|
'# Discovered Virtual Environments:',
|
||||||
|
'\n'.join(venvs),
|
||||||
|
'',
|
||||||
'- To export the contents of a (deprecated) virtual environment, ' 'run the following command while supplying the path as an argument:',
|
'- To export the contents of a (deprecated) virtual environment, ' 'run the following command while supplying the path as an argument:',
|
||||||
'awx-manage export_custom_venv /path/to/venv',
|
'awx-manage export_custom_venv /path/to/venv',
|
||||||
'',
|
'',
|
||||||
@ -31,7 +32,8 @@ class Command(BaseCommand):
|
|||||||
'',
|
'',
|
||||||
]
|
]
|
||||||
print('\n'.join(msg))
|
print('\n'.join(msg))
|
||||||
|
else:
|
||||||
|
print('\n'.join(venvs), '\n')
|
||||||
else:
|
else:
|
||||||
msg = ["No custom virtual environments detected in:", settings.BASE_VENV_PATH]
|
msg = ["No custom virtual environments detected in:", settings.BASE_VENV_PATH]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user