You can use Ansible for this. Ansible is an open-source platform designed for automating tasks. It comes with Playbooks, a descriptive language based on YAML, that make it easy to create and describe automation jobs. Also, Ansible communicates with every host over SSH, making it very secure. See
Ansible Overview for more info. Also, Puppet is another option. Puppet is an open-source software tool that gives you an automatic way to inspect, deliver, operate and future-proof all of your software, no matter where it is executed. It runs on many Unix-like systems as well as on Microsoft Windows and includes its own declarative language to describe system configuration. It is very simple to use and allows you to install and configure Wazuh easily.
I will leave here a couple of links where you can check examples of how this could be done:
Hope this was helpful. Let me know if you need anything else.
Yana.