Properly control debug logs for standalone
'openstack tripleo deploy' should be invoked with --debug
in order to display events from ansible would be hidden with
no_log otherwise:
no_log: "{{ not ((ansible_verbosity | int) >= 2) | bool }}"
And ansible_verbosity in tripleoclient only gets >=2 whenever
the openstack cliff's app.options.debug=True or
app_args.verbose_level > 1.
Add tripleo_deploy_debug_arg to control that. It is defaults to
False.
Depends-On: https://review.opendev.org/730883
Change-Id: I1464d895d579d83955e968413741aac80b9af0f0
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
@@ -15,6 +15,7 @@ Role Variables
|
||||
* `tripleo_deploy_cleanup`: (Boolean) Cleanup temporary files after execution. Default: false
|
||||
* `tripleo_deploy_control_virtual_ip`: (String) Control plain VIP address.
|
||||
* `tripleo_deploy_debug`: (Boolean) Flag to print out the command that is run. Default: false
|
||||
* `tripleo_deploy_debug_arg`: (Boolean) Flag for ansible to use -vv. Default: false
|
||||
* `tripleo_deploy_generate_scripts`: (Boolean) Write out a shell script that can be used to reproduce the command being executed. By default uses the value of `tripleo_generate_scripts` or False if `tripleo_generate_scripts` is not defined.
|
||||
* `tripleo_deploy_generate_scripts_only`: (Boolean) Do not run the actual command - to be used in conjonction with `tripleo_deploy_generate_scripts`. By default uses the value of `tripleo_generate_scripts_only` or False if `tripleo_generate_scripts_only` is not defined.
|
||||
* `tripleo_deploy_deployment_python_interpreter`: (String) Path to a python interpreter for the deployment actions.
|
||||
|
||||
@@ -5,6 +5,7 @@ tripleo_deploy_become: true
|
||||
tripleo_deploy_cleanup: false
|
||||
tripleo_deploy_control_virtual_ip:
|
||||
tripleo_deploy_debug: false
|
||||
tripleo_deploy_debug_arg: false
|
||||
tripleo_deploy_deployment_python_interpreter:
|
||||
tripleo_deploy_deployment_user: "{{ ansible_env.USER }}"
|
||||
tripleo_deploy_environment_files: []
|
||||
|
||||
@@ -385,3 +385,19 @@
|
||||
assert:
|
||||
that:
|
||||
- tripleo_deploy_output == "tripleo deploy --local-ip 192.168.24.2/24 --force-stack-update"
|
||||
|
||||
- name: Check parameter "tripleo_deploy_debug_arg"
|
||||
include_role:
|
||||
name: "tripleo_deploy"
|
||||
vars:
|
||||
tripleo_deploy_templates:
|
||||
tripleo_deploy_stack:
|
||||
tripleo_deploy_standalone: false
|
||||
tripleo_deploy_standalone_role:
|
||||
tripleo_deploy_timeout_arg:
|
||||
tripleo_deploy_debug_arg: true
|
||||
|
||||
- name: Assert "tripleo_deploy_debug_arg"
|
||||
assert:
|
||||
that:
|
||||
- tripleo_deploy_output == "tripleo deploy --debug --local-ip 192.168.24.2/24"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
set_fact:
|
||||
_deploy_cmd: >-
|
||||
{{ openstack_bin }} tripleo deploy
|
||||
{{ tripleo_deploy_debug_arg | ternary('--debug', '') }}
|
||||
{{ tripleo_deploy_templates | ternary('--templates $DEPLOY_TEMPLATES', '') }}
|
||||
{{ tripleo_deploy_standalone | ternary('--standalone', '') }}
|
||||
{{ tripleo_deploy_upgrade | ternary('--upgrade', '') }}
|
||||
|
||||
Reference in New Issue
Block a user