#!/bin/bash # here target can be either the cluster name or single hosts role=`pwd | xargs basename` plays=`ls -1 *.yaml *.yml 2>/dev/null | grep -v '\-incl\-'` plays=`echo $plays | sed 's/ /|/g'` [[ -z $2 ]] && echo usage: ${0##*/} \ \<$plays\> && exit 1 target=$1 play=$2 if [[ $3 = debug ]]; then cat <