Hi Dick,
Thanks very much for your help. :)
Thats exactly what i wanted.
Regards
Rakesh
On Saturday, June 29, 2019 at 1:12:47 PM UTC+5:30, Dick Visser wrote:
>
> You could use a template like this:
>
>
>
> {% for iface in ansible_interfaces | difference(['lo','eth0']) | sort %}
> {{ iface }}: {{ hostvars[inventory_hostname]['ansible_' ~
> iface]['macaddress'] }}
> {% endfor %}
>
>
> This will yield:
>
> eth1: 08:00:27:b3:59:d0
> eth2: 08:00:27:87:1b:de
> eth3: 08:00:27:9b:80:85
> eth4: 08:00:27:90:ad:eb
>
>
>
>
>
> On Fri, 28 Jun 2019 at 07:54, Rakesh Parida <[email protected]
> <javascript:>> wrote:
> >
> > Hi ,
> >
> > My VM has 4 ip-interfaces . I want to extract a data as below using
> ansible.
> > Interface1: macaddress
> > Interface2: macaddress
> > Interface3: macaddress
> > Interface4: macaddress
> >
> > Kindly help.
> >
> > --
> > 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] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/fdbcffbf-0f59-4af1-942f-a85a751237cf%40googlegroups.com.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
--
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/a952b612-2ee0-4a64-988e-83aa7db6e8c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.