Thanks Kai for the help.appreciate it

On Wed, Nov 29, 2017 at 8:14 PM, Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:

> On Wednesday, 29 November 2017 15.35.03 CET coach rhca wrote:
> >
> > Thanks Kai, I did the same as suggested by you to find the ifcfg-* but
> when
> > i register the variable say result. the output of the result variable
> shows
> > the entire list of attributes of the file, we need to get only the name
> of
> > the interface but what the output is as below..could you please suggest
> as
> > to how to curtail the output to give interface name:
> >
> >
> > the output shows as below :
> >
> >
> >  {
> >                 "atime": 1511964673.1590006,
> >                 "ctime": 1511420044.9254873,
> >                 "dev": 2051,
> >                 ..................................
> >                 "isreg": true,
> >                 "issock": false,
> >                 "isuid": false,
> >                 "mode": "0644",
> >                 "mtime": 1511420044.9214873,
> >                 "nlink": 1,
> >                 "path": "/etc/sysconfig/network-
> scripts/ifcfg-eno16777736",
> >                 "rgrp": true,
> >                 "roth": true,
> > }
>
>
> - debug: msg="The interface {{ item.path.split('-')[2] }} is configured in
> {{ item.path }}"
>   with_items: '{{ result.files }}'
>
>
> --
> 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
> ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/2182320.VtXPe1usRS%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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALguqPK6TZJ9X4-SSzvJ8W5XR1vPhY9aTqNxOkfJnz9GQnbK%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to