Call me clueless but from
"stdout_lines": [
[
"Interface IP-Address OK?
Method Status Protocol",
"GigabitEthernet0/0/0 42.151.182.42 YES
DHCP up up"
]
]
You have two fields being returned. Pick the second one and print it
using debug. Then split the SOB.
On Fri, May 28, 2021 at 6:25 AM R.B. Kumar <[email protected]> wrote:
>
> Hi Jatin / All Thank you
>
> solved the problem. The issue is by using {{ item }} the output format is
> different. By using hierarchy I am able to get the IP address greped. Thanks
> again to all
> On Friday, May 28, 2021 at 2:29:01 PM UTC+5:30 R.B. Kumar wrote:
>>
>> Thank you. But gigabit and Gigbit case difference is not a matter here..
>>
>> All i am trying to do is, using {{ item }} i a getting a output from a Cisco
>> Router and want to grep only a IP address value in the in output and store
>> it in a variable. so that i can use the variable in the script
>>
>> regards, RB
>>
>> On Friday, May 28, 2021 at 2:17:56 PM UTC+5:30 Antony Stone wrote:
>>>
>>> I would suggest there is a meaningful difference between
>>> "gigabitEthernet0/0/0"
>>> and "Gigabitethernet 0/0/0".
>>>
>>>
>>> Antony.
>>>
>>> --
>>> It is also possible that putting the birds in a laboratory setting
>>> inadvertently renders them relatively incompetent.
>>>
>>> - Daniel C Dennett
>>>
>>> Please reply to the list;
>>> please *don't* CC me.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/41e0e726-c996-4f31-9468-2d1f18261401n%40googlegroups.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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAHEKYV505DG9qbPUryPJhj0i%3Dygehk9hovuXozk0G5XksE6Htw%40mail.gmail.com.