ansible-taler-exchange

Ansible playbook to deploy a production Taler Exchange
Log | Files | Refs | README | LICENSE

sanction-check (517B)


      1 #!/bin/bash
      2 
      3 set -eu
      4 
      5 if [ -z "${1:-}" ]; then
      6   echo "Usage: $0 <host/group> <sanction-list> [ansible-playbook options...]" >&2
      7   exit 1
      8 fi
      9 
     10 if [ -z "${2:-}" ]; then
     11   echo "Pass sanction list as 2nd argument"
     12   exit 1
     13 fi
     14 
     15 if [ ! -f "$2" ]; then
     16   echo "Sanction list '$2' not found"
     17   exit 1
     18 fi
     19 
     20 target=$1
     21 sanction_list=$2
     22 shift 2
     23 
     24 ansible-playbook \
     25   --extra-vars "sanction_list=$sanction_list" \
     26   --verbose \
     27   --limit "$target" \
     28   --inventory inventories/default \
     29   playbooks/sanctionlist-check.yml \
     30   "$@"