#!/bin/bash SERVER=$1 PLAYBOOK=$2 SITE_NAME=$3 while [[ "$#" -gt 0 ]]; do case $1 in -f|--force) force=1; shift ;; esac shift done usage() { echo "Usage: run-vps-playbook.sh server playbook [site_name]" echo "server - domain or ip adress of the vps server" echo "site_name - site name" echo "playbook - playbook file" } if [[ -z "$SERVER" ]]; then echo "You must defined SERVER as first argument" usage exit 1 fi if [[ -z "$PLAYBOOK" ]]; then echo "You must defined PLAYBOOK as third argument" usage exit 1 fi COMMAND=$(cat <