Can you get away with using the inventory hostnames? I'm guessing perhaps
not.
{{ ",".join(groups.webservers) }}
It would probably require writing a lookup plugin.
{{ lookup("jsm_magic_all_my_facts", "webservers", "ansible_hostname") }}
Others may have better suggestions but that's what my brain is thinking
currently :)
On Tue, Dec 17, 2013 at 7:39 PM, James Martin <[email protected]> wrote:
> I have a command that needs the fqdn's of all servers within an
> inventory group as input.
>
> - name: run special command
> command: mycommand "foo.host bar.host baz.host"
>
>
> Is there a simple way to create such a string without having to write
> out a template, cat it, register it, and using the registered
> variable's stdout?
>
>
> Thanks,
>
> James
>
> --
> 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 post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Michael DeHaan <[email protected]>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/
--
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.