Skip to content

Commit

Permalink
feat: add possibilty to always verbose output
Browse files Browse the repository at this point in the history
  • Loading branch information
fadnincx committed May 4, 2023
1 parent a514b29 commit 9a7956e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ potos_basics_runtypes:
on_calendar: 'hourly'
- runtype: 'setup'

potos_basics_always_verbose: false

potos_basics_on_error_additional_lines:
- "Contact your local administrator at admin@example.com"

Expand Down
2 changes: 2 additions & 0 deletions templates/usr/bin/potos-ansible-pull.j2
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ while :; do
shift
done
{% if not potos_basics_always_verbose | default(false) %}
# if not verbose, pipe everything to /dev/null
if ! $VERBOSE; then
exec >/dev/null 2>&1
fi
{% endif %}
# Check if working directory exists
[ -d '{{ potos_basics_ansible_workdir }}' ] || mkdir -p {{ potos_basics_ansible_workdir }}
Expand Down

0 comments on commit 9a7956e

Please sign in to comment.