i do this, mixed with a little docker run
inside of Makefiles. i store all my ansible playbooks in a repo, along with other repos for different projects and purposes. i store all of those in git repos that i clone via ssh from a server that acts as a NAS backed by zfs.
See also: https://en.m.wikipedia.org/wiki/Embrace,_extend,_and_extinguish