Hi,
I am (still) new to working with Ansible…
In the inventory in our tower environment, we have groups configured.
I am trying to modify an existing playbook (and template file) to set a new property, “cache.memberlist”, with a value of all the hostnames in a specific group named, “SVC”.
I tested a small playbook:
- hosts: all
gather_facts: true
tasks: - set_fact:
host_list: “{{ groups[‘SVC’] }}” - debug:
msg: “{{host_list}}”
That does look like it is finding the hostnames, but (a) it is doing that for every host in the inventory and (b) it looks like, for every host, it is trying to connect to that host.
Is there some way that the playbook can just find (and return) the hostnames that are in the SVC group and return that?
Thanks,
Jim