# Check for a string value in a log file in a path and match and proceed accordingly using ansible find module

**URL:** <https://forum.ansible.com/t/check-for-a-string-value-in-a-log-file-in-a-path-and-match-and-proceed-accordingly-using-ansible-find-module/27173>\
**Category:** Ansible Project\
**Created:** [April 3, 2018, 5:59am UTC](https://forum.ansible.com/t/check-for-a-string-value-in-a-log-file-in-a-path-and-match-and-proceed-accordingly-using-ansible-find-module/27173 "2018-04-03T05:59:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shreela\_Roy](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Shreela\_Roy](https://forum.ansible.com/u/Shreela_Roy)\
**Post date:** [April 3, 2018, 5:59am UTC](https://forum.ansible.com/t/check-for-a-string-value-in-a-log-file-in-a-path-and-match-and-proceed-accordingly-using-ansible-find-module/27173/1 "2018-04-03T05:59:03Z")

</div>

What I want to achieve here is check the log file: 12-2017PM-PATCH.log in /var/log  
and find for the word COMPLETED in it and return to me the output for each hosts in Inventory .

What would be the syntax to put the search string in contains parameter and patterns parameter. Please please help me. I tried as below, need guidance

-sh-4.1$ cat ip360\_mod\_02042018.yml
