#!/bin/bash [[ -z $1 ]] && echo target? && exit 1 target=$1 prep_inventory_list=`find ../inventory/ -maxdepth 1 -type f` prep_inventory_args=`echo "$prep_inventory_list" | sed 's/^/-i /'` ansible-playbook tasks-hw-resources.yml $prep_inventory_args -e "target=$target" -e @ansible_vars.json --check echo ready? read -r ansible-playbook tasks-hw-resources.yml $prep_inventory_args -e "target=$target" -e @ansible_vars.json