I completely agree with OP when Ansible is overkill for must cases, and even slower than a plain smart shell script.
For my solution, simple create a bash function:
function play ()
local remote=${2}
local script=${1}
local directory=$(dirname ${script})
tar cpf - ${directory}/ | ssh -t ${remote} "
tar xpf - -C /tmp &&
cd /tmp/${dirname} &&
bash /tmp/${script} &&
rm -rf /tmp/${dirname} "
}
I completely agree with OP when Ansible is overkill for must cases, and even slower than a plain smart shell script.
For my solution, simple create a bash function:
and later just call it like. Where provision is a directory, and bootstrap.sh is the main shell script.