#!/bin/bash # # Apply specific ansible tags/roles to selected machine # @usage # Help fonction function usage() { echo "Usage: ${0} \"role1 role2 .. roleN\" [ANSIBLE_ARGUMENTS]" } for role in ${1}; do ansible_args=$(echo "${@:2}") ansible-playbook ${ansible_args} --tags "${role}" done