thanks Kai, actually trying to edit a parameter in the network  interface
files I am using something like
lineinfile: "dest=/etc/sysconfig/network-scripts/*ifcfg-{{
ansible_default_ipv4.interface }*} regexp='^{{ item.regexp }}' line='{{
 item.line }}'"

but this only gives me the default network card but i want to edit the
changes in all the available network interfaces like ifcfg-en0117 or
ifcfg-en037 whatever is present in the host except the lo interface..could
you please suggest as to how we can do on multiple interface...thank you .

On Tue, Nov 28, 2017 at 8:00 PM, Kai Stian Olstad <
[email protected]> wrote:

> On Tuesday, 28 November 2017 12.15.41 CET [email protected] wrote:
> > IS there is a way that we can get the name of all network interfaces as
> we
> > have ansible_default_ipv4.interface gives only the primary one . Need to
> > get all the interface name so that a parameter can be modified for it.
>
> ansible_interfaces it's list with all of them.
>
> You can always run "ansible host -m setup" to check all the facts from a
> host.
>
>
> --
> Kai Stian Olstad
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ansible-project/Jj4e_dFxiW4/unsubscribe.
> To unsubscribe from this group and all its topics, 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/1685407.S9aSPNRFpI%40x1.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CALguqP%2BYtUmEdQOihL4E6xOf9ZiFMqE8JxrDwL-ApRstFu7Emw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to