Hi Team,
My use case is to run the task on group of hosts as a pre-task but I am having trouble passing group_name to delegate_to in the playbook as it expects only a string not a list.
Then I tried to use the loop option but it is unable to retrieve the list of host name from the group name in AWX. it passes the group name as literal to that loop. Could someone help if you tried this approach already or any alternative suggestion.
sample task:
- name: Generate ip addresses from the group varaiable.
delegate_to: “{{ item }}”
loop: “{{ selected_groups }}”
delegate_facts: true