diff --git a/playbooks/load_secrets.yml b/playbooks/load_secrets.yml index 49b2670..ddb05c2 100644 --- a/playbooks/load_secrets.yml +++ b/playbooks/load_secrets.yml @@ -21,6 +21,14 @@ - name: Process secrets via role ansible.builtin.include_role: name: load_secrets + rescue: + - name: "Print debugging command when secrets loading fails" + ansible.builtin.shell: | + printf "==> ERROR: Secret loading failed {{ ansible_failed_result.msg | default('Unknown error occurred') }}\n" > /dev/tty + printf "\n" > /dev/tty + printf "You can run the following command to debug:\n" > /dev/tty + printf "\n" > /dev/tty + printf " ANSIBLE_STDOUT_CALLBACK=default EXTRA_PLAYBOOK_OPTS='-vvv -e hide_sensitive_output=false' ./pattern.sh make load-secrets\n" > /dev/tty - name: Print secret loading disabled message ansible.builtin.shell: |