mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -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["projects"] = proj
|
||||
results["inventory_sources"] = invsrc
|
||||
print('\n', '# {}'.format("Virtual environments associations:"))
|
||||
print(yaml.dump(results))
|
||||
|
||||
if not options.get('q'):
|
||||
msg = [
|
||||
'',
|
||||
'# Virtual Environments Associations:',
|
||||
yaml.dump(results),
|
||||
'- To list all (now deprecated) custom virtual environments run:',
|
||||
'awx-manage list_custom_venvs',
|
||||
'',
|
||||
@ -53,6 +51,8 @@ class Command(BaseCommand):
|
||||
'',
|
||||
]
|
||||
print('\n'.join(msg))
|
||||
else:
|
||||
print(yaml.dump(results))
|
||||
|
||||
else:
|
||||
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:
|
||||
pip_data = get_custom_venv_pip_freeze(options.get('path')[0])
|
||||
if pip_data:
|
||||
print('\n', '# {}'.format("Virtual environment contents:"))
|
||||
print(pip_data)
|
||||
if not options.get('q'):
|
||||
msg = [
|
||||
'# Virtual environment contents:',
|
||||
pip_data,
|
||||
'- To list all (now deprecated) custom virtual environments run:',
|
||||
'awx-manage list_custom_venvs',
|
||||
'',
|
||||
@ -40,6 +40,8 @@ class Command(BaseCommand):
|
||||
'',
|
||||
]
|
||||
print('\n'.join(msg))
|
||||
else:
|
||||
print(pip_data)
|
||||
|
||||
else:
|
||||
print('\n', '# Incorrect path, verify your path is from the following list:')
|
||||
|
||||
@ -17,10 +17,11 @@ class Command(BaseCommand):
|
||||
super(Command, self).__init__()
|
||||
venvs = get_custom_venv_choices()
|
||||
if venvs:
|
||||
print('\n', '# {}'.format("Discovered virtual environments:"))
|
||||
print('\n'.join(venvs), '\n')
|
||||
if not options.get('q'):
|
||||
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:',
|
||||
'awx-manage export_custom_venv /path/to/venv',
|
||||
'',
|
||||
@ -31,7 +32,8 @@ class Command(BaseCommand):
|
||||
'',
|
||||
]
|
||||
print('\n'.join(msg))
|
||||
|
||||
else:
|
||||
print('\n'.join(venvs), '\n')
|
||||
else:
|
||||
msg = ["No custom virtual environments detected in:", settings.BASE_VENV_PATH]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user