From f2c11a728df2bd666d9477f67fb3f156fb620656 Mon Sep 17 00:00:00 2001 From: Nikolaus Holmes <143398822+niko-holmes@users.noreply.github.com> Date: Wed, 5 Aug 2026 15:37:22 +0100 Subject: [PATCH 1/5] Write all logs to terminal --- bin/run-ansible.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/run-ansible.sh b/bin/run-ansible.sh index 28866a636..afa19f7f5 100755 --- a/bin/run-ansible.sh +++ b/bin/run-ansible.sh @@ -34,7 +34,10 @@ command_usage_message="${command_usage_message} [=] [> "$LOG_FILE" + local message="$1" + + echo "$message" + echo "$(date +'%Y-%m-%d %H:%M:%S') - $message" >> "$LOG_FILE" } @@ -628,4 +631,4 @@ if [[ -f "$LOG_FILE" ]]; then echo -e "Full logs available at: ${BOLD}$LOG_FILE${NC}" fi -exit 0 \ No newline at end of file +exit 0 From fdba487a422386efd4cea48baf7bee460bcbfc85 Mon Sep 17 00:00:00 2001 From: Nikolaus Holmes <143398822+niko-holmes@users.noreply.github.com> Date: Wed, 5 Aug 2026 16:47:45 +0100 Subject: [PATCH 2/5] Log installed pip packages --- bin/run-ansible.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/run-ansible.sh b/bin/run-ansible.sh index afa19f7f5..979d0098c 100755 --- a/bin/run-ansible.sh +++ b/bin/run-ansible.sh @@ -504,6 +504,7 @@ if ! install_pip_packages >> "$LOG_FILE" 2>&1; then show_error "Failed to install pip packages using install_pip_packages. Check $LOG_FILE." fi log_message "Pip packages installed." +log_message "$(pip list)" # Fix for WSL From ec419d52039acde3832a309cdfe116350939352e Mon Sep 17 00:00:00 2001 From: Nikolaus Holmes <143398822+niko-holmes@users.noreply.github.com> Date: Thu, 6 Aug 2026 09:23:28 +0100 Subject: [PATCH 3/5] Added function to list pip pkgs --- bin/conda_utils.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/conda_utils.sh b/bin/conda_utils.sh index 84fbb46be..ad512bd9a 100644 --- a/bin/conda_utils.sh +++ b/bin/conda_utils.sh @@ -128,3 +128,5 @@ install_ansible_collections() { ansible_galaxy_executable=$1 "${ansible_galaxy_executable}" collection install $(realpath ${packages_download_root}/ansible_collections/*) } + +list_pip_packages() { ${miniconda_install_location}/bin/pip3 list ; } From 1f05012ffd70136717fbcea22a04f784d0fa0177 Mon Sep 17 00:00:00 2001 From: Nikolaus Holmes <143398822+niko-holmes@users.noreply.github.com> Date: Thu, 6 Aug 2026 09:23:59 +0100 Subject: [PATCH 4/5] Fix pip package printing --- bin/run-ansible.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/run-ansible.sh b/bin/run-ansible.sh index 979d0098c..4a43dc057 100755 --- a/bin/run-ansible.sh +++ b/bin/run-ansible.sh @@ -504,7 +504,7 @@ if ! install_pip_packages >> "$LOG_FILE" 2>&1; then show_error "Failed to install pip packages using install_pip_packages. Check $LOG_FILE." fi log_message "Pip packages installed." -log_message "$(pip list)" +log_message "$(list_pip_packages)" # Fix for WSL From d1c77ed5954522f27bc23f821d087959d51557f1 Mon Sep 17 00:00:00 2001 From: niko-holmes Date: Wed, 12 Aug 2026 14:17:48 +0100 Subject: [PATCH 5/5] Added cl arg to disable full logging --- bin/conda_utils.sh | 4 ++-- bin/run-ansible.sh | 26 +++++++++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/bin/conda_utils.sh b/bin/conda_utils.sh index ad512bd9a..cc6153799 100644 --- a/bin/conda_utils.sh +++ b/bin/conda_utils.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2024 Shadow Robot Company Ltd. +# Copyright 2024, 2026 Shadow Robot Company Ltd. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -38,7 +38,7 @@ done < <(lsb_release -a 2>/dev/null) # We use this variable to figure out which pip packages to download. Packages for focal work on jammy, but bionic needs its own packages if ! [[ $codename == *"bionic"* ]]; then - codename="focal" + codename="focal" fi _fetch_conda_installer() { diff --git a/bin/run-ansible.sh b/bin/run-ansible.sh index 4a43dc057..c24c03fff 100755 --- a/bin/run-ansible.sh +++ b/bin/run-ansible.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2022-2024 Shadow Robot Company Ltd. +# Copyright 2022-2024, 2026 Shadow Robot Company Ltd. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free @@ -36,7 +36,10 @@ command_usage_message="${command_usage_message} [=] [> "$LOG_FILE" } @@ -73,7 +76,7 @@ show_error() { log_message "Script started. Name: ${script_name}" log_message "Command line arguments: $@" -if [[ $# -lt 2 ]]; then +if [[ $# -lt 2 ]]; then show_error "Insufficient arguments provided.\n${command_usage_message}" "false" fi @@ -89,10 +92,11 @@ aurora_home=/tmp/aurora playbook=$1 aurora_limit=all +quiet_logs=false shift log_message "Parsing command line options..." -while [[ $# -gt 0 ]]; do # +while [[ $# -gt 0 ]]; do # key="$1" case ${key} in --branch) @@ -115,6 +119,10 @@ while [[ $# -gt 0 ]]; do # read_secure="$2" shift 2 ;; + --quiet_logs) + quiet_logs=true + shift + ;; *) # This will now capture extra_vars break ;; @@ -186,8 +194,8 @@ old_IFS=$IFS IFS=";" formatted_extra_vars="" for extra_var_pair in $extra_vars; do # $extra_vars should be space separated "key=value" "key2=value with space" - variable="${extra_var_pair%%=*}" - value="${extra_var_pair#*=}" + variable="${extra_var_pair%%=*}" + value="${extra_var_pair#*=}" if [[ "$value" == *' '* && ! ("$value" == \'*\' || "$value" == \"*\") ]]; then # Avoid double quoting value="'$value'" fi @@ -337,8 +345,8 @@ if [[ $formatted_extra_vars == *"pr_branches="* ]]; then fi log_message "xclip installed." fi - fi -fi + fi +fi if [[ -n "$read_input" ]]; then log_message "Processing --read-input: ${read_input}" @@ -372,7 +380,7 @@ if [[ -n "$read_input" ]]; then echo "Select Open Link and follow the steps from number 2 onwards:" echo "https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account" echo " ----------------------------------------------------------------------------------------------------" - + ssh_key_added_confirm="" while [[ "$ssh_key_added_confirm" != "y" ]]; do printf "Confirm if you have added the SSH key to your Github account (y/n):"