In fact I misunderstood your needs…
Yes Bash script is a way to do it. The other ways are Salt and Ansible (presently very alpha).