commit 6d2945497454d0e8b237e60286701930224c5955 parent 626c974339cc8cc1a4cd277114df36c8123dc4ef Author: Florian Dold <florian@dold.me> Date: Fri, 3 Jul 2026 15:43:43 +0200 fix check in sanction-check.sh, format Diffstat:
| M | sanction-check.sh | | | 34 | +++++++++++++++++----------------- |
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/sanction-check.sh b/sanction-check.sh @@ -1,25 +1,25 @@ #!/bin/bash set -eu -if [ -z ${1:-} ] -then - echo "Call with 'spec' or other host/group as target" - exit 1 + +if [ -z ${1:-} ]; then + echo "Call with 'spec' or other host/group as target" + exit 1 fi -if [ -z ${2:-} ] -then - echo "Pass sanction list as 2nd argument" - exit 1 + +if [ -z ${2:-} ]; then + echo "Pass sanction list as 2nd argument" + exit 1 fi -if [ -f ${2:-} ] -then - echo "Sanction list '$2' not found" - exit 1 + +if [ ! -f ${2:-} ]; then + echo "Sanction list '$2' not found" + exit 1 fi ansible-playbook \ - --extra-vars "SANCTION_LIST=$2" \ - --verbose \ - --limit "$1" \ - --inventory inventories/default \ - playbooks/sanctionlist-check.yml + --extra-vars "SANCTION_LIST=$2" \ + --verbose \ + --limit "$1" \ + --inventory inventories/default \ + playbooks/sanctionlist-check.yml