From 2585a93bb00c2d93d71568d4737b85881f1d0fef Mon Sep 17 00:00:00 2001 From: David Valin Date: Tue, 21 Jan 2025 15:25:18 -0500 Subject: [PATCH] Code review changes. --- bin/burden | 14 +++++++------- bin/kick_off.sh | 9 ++++++++- documentation/zathras_doc.adoc | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/bin/burden b/bin/burden index 6c68459..40c7ede 100755 --- a/bin/burden +++ b/bin/burden @@ -190,7 +190,7 @@ gl_max_systems_set=0 # should provide a usage. The --test_version_check option is present # so we can only check the versions via an option # -gl_ansible_verboisty="normal" +gl_ansible_verbosity="normal" gl_test_version_check=1 gl_update_test_versions=0 gl_disk_iops=0 @@ -1896,8 +1896,8 @@ create_ansible_options() if [[ "$gl_ssh_key_file" != "" ]]; then base_string="${base_string} -s $gl_ssh_key_file" fi - if [[ $gl_ansible_verboisty != "normal" ]]; then - base_string=${base_string}" -l $gl_ansible_verboisty" + if [[ $gl_ansible_verbosity != "normal" ]]; then + base_string=${base_string}" -l $gl_ansible_verbosity" fi echo $cli "${arguments[@]}" | sed "s/bin/./g" > ${run_dir}/exec_command test_info_str=`grep test_to_run: $run_dir/ansible_vars_main.yml | sed "s/\[//g" | sed "s/\]//g" | cut -d: -f 2 | sed "s/ //g"` @@ -3058,7 +3058,7 @@ usage() echo " --ansible_noise_level : How much information ansible is to output." echo " normal: standard ansible output" echo " dense: just report the task executed" - echo " null: nothing reported" + echo " silence: nothing reported" echo " --archive /: location to save the archive information to" echo " --child: tells burden it is a child of another burden process and not to" echo " perform the initial setup work" @@ -3237,10 +3237,10 @@ set_general_value() case "$1" in --ansible_noise_level) echo "$1 $2" >> $gl_cli_supplied_options - if [[ $2 != "normal" ]] && [[ $2 != "dense" ]] && [[ $2 != "null" ]]; then - cleanup_and_exit "$2 not valid value for --ansible_noise_level. Valid values are normal, dense or null" 1 + if [[ $2 != "normal" ]] && [[ $2 != "dense" ]] && [[ $2 != "silence" ]]; then + cleanup_and_exit "$2 not valid value for --ansible_noise_level. Valid values are normal, dense or silence" 1 fi - gl_ansible_verboisty=$2 + gl_ansible_verbosity=$2 shift_by=2 ;; --archive) diff --git a/bin/kick_off.sh b/bin/kick_off.sh index 71cb6f2..f30cbcd 100755 --- a/bin/kick_off.sh +++ b/bin/kick_off.sh @@ -173,7 +173,14 @@ echo "[defaults]" >> ansible.cfg echo "roles_path = ~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:~/.ansible/collections/ansible_collections/pbench/agent/roles" >> ansible.cfg echo "log_path=${curdir}/ansible_log" >> ansible.cfg if [[ $ansible_noise_level != "normal" ]]; then - echo "stdout_callback = $ansible_noise_level" >> ansible.cfg + if [[ $ansible_noise_level == "silence" ]]; then + # + # Ansible option for no output is null. + # + echo "stdout_callback = null" >> ansible.cfg + else + echo "stdout_callback = $ansible_noise_level" >> ansible.cfg + fi fi current_test=0 for sys_config in ${individual}; diff --git a/documentation/zathras_doc.adoc b/documentation/zathras_doc.adoc index 7271200..e24c0dd 100644 --- a/documentation/zathras_doc.adoc +++ b/documentation/zathras_doc.adoc @@ -135,7 +135,7 @@ General options --ansible_noise_level: <level>: How much information ansible is to output. normal: standard ansible output dense: just report the task executed - null: nothing reported + silence: nothing reported --archive <dir>/<results>: location to save the archive information to --child: tells burden it is a child of another burden process and not to perform the initial setup work