Subject: [ansible-project] When: inventory_hostname not in ./my_file.txt


assuming the file is 'local on the controller':

when: lookup('pipe', 'grep ' + inventory_hostname + ' ../myfile.txt'

otherwise use the 'find' plugin with 'contains', register results and
use conditional on that.

--
----------
Brian Coca

--
To post to this group, send email to [EMAIL PROTECTED].