Re: [ansible-devel] removing the extra new line from the stdout_lines in ansible

2019-07-23 Thread 'Kosala Atapattu' via Ansible Development
this is where filter_plugins may come handy. On Tue, Jul 23, 2019 at 4:53 PM Bubunia Patra wrote: > Thanks for your quick help. But I need to use the conditionals for > searching multiple strings. Is it possible? When I use > ({{ stdout_lines|select('search', 'A')|first }}) or ({{ > stdout_li

Re: [ansible-devel] removing the extra new line from the stdout_lines in ansible

2019-07-22 Thread Bubunia Patra
Thanks for your quick help. But I need to use the conditionals for searching multiple strings. Is it possible? When I use ({{ stdout_lines|select('search', 'A')|first }}) or ({{ stdout_lines|select('search', 'B')|first }}) it dont work and returning me a generator object. Can you please help?

Re: [ansible-devel] removing the extra new line from the stdout_lines in ansible

2019-07-22 Thread Matt Martz
I'd probably just use something like this instead: - debug: msg: "{{ stdout_lines|select('search', 'A')|first }}" On Mon, Jul 22, 2019 at 12:18 PM Bubunia Patra wrote: > Hi all, > > I am trying to parse the stdout_lines to find the matching strings in a > line. But the problem is stdout_lin