Im trying to read a file line by line and pass it to a shell module
Is this completely wrong or i just have to find a way to make the wildcard and string to match .
name: remove older files
shell: ls “{{item}}.jar”
with_lines: cat file11/branches.txt
Im trying to read a file line by line and pass it to a shell module
Is this completely wrong or i just have to find a way to make the wildcard and string to match .
I couldnt search using matching string . in the below case it runs fine without the wildcards * , but with wildcards it fails . tried few other approaches .cdnt find a proper solution
name: Find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz
find:
paths: /home/tagit/test
patterns: ‘“{{item}}”’
with_lines: cat file11/branches.txt
I couldnt search using matching string . in the below case it runs fine without the wildcards * , but with wildcards
it fails . tried few other approaches .cdnt find a proper solution
- name: Find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz
find:
paths: /home/tagit/test
patterns: '*"{{item}}"*'
with_lines: cat file11/branches.txt
Drop the " as they will be literally passed to the module. Jinja variables work the same in ' as in ".