Re: [ansible-project] How to check if a word is present in list

2020-05-04 Thread T. JENISHA
Hi Matt Martz Excellent solution. For my windows role I have to change to agent["stdout_lines"]|select('search','COMPLETED')|list != [] Best Regards Jenisha T Whatsapp: +91 07598087866 On Tue, 5 May 2020 at 02:53, Matt Martz wrote: > agent.stdout_lines|select('search', 'COMPLETED')|list !=

Re: [ansible-project] How to check if a word is present in list

2020-05-04 Thread Matt Martz
agent.stdout_lines|select('search', 'COMPLETED')|list != [] On Mon, May 4, 2020 at 4:18 PM Jenisha T wrote: > My output from script execution is > > agent: { > "stdout_lines": [ The network is reachable. Connected using > winrm, executin COMPLETED at 4/5, The file is saved at D:\ ] >

[ansible-project] How to check if a word is present in list

2020-05-04 Thread Jenisha T
My output from script execution is agent: { "stdout_lines": [ The network is reachable. Connected using winrm, executin COMPLETED at 4/5, The file is saved at D:\ ] } I want to extract 'COMPLETED' from this list. In python logic: listToStr = ' '.join([str(elem) for elem in agent[