Hi,

I think that I figured my question out... it was a "momentary fog" on my 
part :(....  I have been using mostly ansible-playbook, and hardly ever 
used tower, but I just realized that I needed to put the specific hosts in 
the "limit" on the template page in Tower.  Then, it only runs the playbook 
against those specific hosts.

Sorry about that!

Jim

On Sunday, February 27, 2022 at 4:46:06 PM UTC-5 o haya wrote:

> 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
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1c3bc197-095e-49ad-bf87-230b87ad87a8n%40googlegroups.com.

Reply via email to