Re: [ansible-project] How do i compare the parsed output against a value?

2021-04-21 Thread Vikram S
Hi Dick, I assumed everyone using ansible would have atleast heard about parsing (even if not used it), that's why i didn't elaborate on it. Maybe i was wrong. Parsing is used to extract data from output saved in a custom variable and use that data for comparison purpose (for example). This is

Re: [ansible-project] How do i compare the parsed output against a value?

2021-04-21 Thread Dick Visser
I have no idea what TTP parser is, but you also didn't tell how that is relevant, so I'll ignore that. What about something basic like: when: show_flash.bandwidth|int >= 5 On Wed, 21 Apr 2021 at 20:30, Vikram S wrote: > > Hi, > > I used TTP parser to parse the output of 'sh run int gi0/0'

[ansible-project] How do i compare the parsed output against a value?

2021-04-21 Thread Vikram S
Hi, I used TTP parser to parse the output of 'sh run int gi0/0' and below is output. Say for example, i want to compare bandwidth value againt a number and check if it higher/lower than a certain value, how do i write the syntax for that? TASK [Display facts] ok: [ROUTER] => { "msg": [