I made something similar years ago, a long one-liner.
tar cpf - provision/ | ssh [email protected] "tar xpf - -C /tmp && cd /tmp/provision && bash /tmp/provision/bootstrap.sh && rm -rf /tmp/provision"
Heres is the full use: https://gist.github.com/mariocesar/8e674ec40dad6b94114d2a44d...I named "Ansible for the Frugal"
Ansible only exists because of an influx of people who don't know how to do this.