Try something like this https://github.com/f500/ansible-dumpall to
understand what you have.
On Wednesday, August 3, 2016 at 10:51:57 PM UTC+5, Bryan Pearson wrote:
>
> I have nodes in AWS and I'd like to use the dynamic inventory to create a
> template. Currently I cant get the facts from all the nodes into the one
> template file. The template only gets populated with the node thats in
> "role deploy" and doesnt include the monitor group.
>
> playbook ---------
>
> - name: Gather facts
> ec2_remote_facts:
> ec2_region: us-east-1
> filters:
> instance-state-name: running
> "tag:Role": monitor
> become: false
> register: ec2
>
> - name: Deploy host template
> template: src=filename dest=filename
> when: "'tag_Role_deploy' in group_names"
>
> jinja2 template-------------
>
> {% for host in groups['tag_Name_monitor'] %}
>
> {{ host }}
>
> {% endfor %}
>
> Thanks
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5c5e525a-dfff-4ae7-8d1a-118239181a10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.