Hello everyone!
I’m new here and also quiet new to ansible as well
I will try to summarize:
The goal:
I wanna get a list of ansible hosts (could be made out of the ansible inv e.g.) and each element should be seperated by a space. The reason for that is that I want to run a bash script which needs a list attached to it like “script.sh host_1 host_2 host_3 …”
The problem:
I need to specify one host, which needs to be in front of every other host e.g. “script.sh host_2 host_1 host_3 …”
My ansible inventory.ini example looks like:
[manager]
host_2.example.de
[utility_nodes]
host_1.example.de host_template=Utility1
host_2.example.de host_template=Utility2
[master_nodes]
host_3.example.de host_template=Master1
host_4.example.de host_template=Master2
Many thanks in advance and
Best regards
Tobi