I mean, this is basically how Ansible works under the hood, only with standalone scripts instead of arbitrary tarballs. You could probably implement it as an action plugin, and then keep using Ansible for all the hard annoying bits- the local execution framework, the ssh wrapper with all the edges sanded down, the 10k handled edge cases around running 'sudo' on arbitrary hosts...