#!/bin/bash if [[ $# < 2 ]]; then cat < [ansible-playbook options] Examples: $0 dest_host my_role $0 custom_host my_role -i 'custom_host,' -vv --check HELP exit 1 fi HOST_PATTERN=$1 shift ROLE=$1 shift echo "Trying to apply role \"$ROLE\" to host/group \"$HOST_PATTERN\"..." ansible-playbook "$@" /dev/stdin <