On 14. okt. 2017 08:57, Vijay Misra wrote:
I have to search for a pattern string in the various log files located in
some directory  on the host. how we can use regex kind of a thing with
command module or may be some other useful ansible way i am not aware about.

here is my code which complains  about vm*.log.

command module is not running a shell so shell expansion like vm*.log will not work, you need to use the shell module.

You could also do this with the find module.


--
Kai Stian Olstad

--
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/47d84473-eaf6-d836-12a2-f63f28d3c390%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to