#!/bin/bash SERVER=$1 SITE_NAME=$2 PLAYBOOK=$3 usage() { echo "Usage: run-vps-playbook.sh server site_name playbook" 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 "$SITE_NAME" ]]; then echo "You must defined SITE_NAME as second argument" usage exit 1 fi if [[ -z "$PLAYBOOK" ]]; then echo "You must defined PLAYBOOK as third argument" usage exit 1 fi COMMAND=$(cat <