On 12/8/20 3:31 PM, Manoj Chander wrote:
> 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 ".
Regards
Racke
>
> On Tuesday, December 8, 2020 at 7:43:18 PM UTC+5:30 [email protected] wrote:
>
> On 12/8/20 3:09 PM, Manoj Chander wrote:
> > 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
> >
>
> Why don't you remove the files immediately with the file module?
>
> Shell module shall be last resort.
>
> Regards
> Racke
>
> >
> >
> >
> >
> >
> > --
> > 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]
> <mailto:[email protected]>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ansible-project/115ee17b-d943-4f2c-8ff5-9c8c7c5adb0dn%40googlegroups.com
>
> <https://groups.google.com/d/msgid/ansible-project/115ee17b-d943-4f2c-8ff5-9c8c7c5adb0dn%40googlegroups.com>
> >
>
> <https://groups.google.com/d/msgid/ansible-project/115ee17b-d943-4f2c-8ff5-9c8c7c5adb0dn%40googlegroups.com?utm_medium=email&utm_source=footer
>
> <https://groups.google.com/d/msgid/ansible-project/115ee17b-d943-4f2c-8ff5-9c8c7c5adb0dn%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
>
> --
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration. Provisioning with Ansible.
>
> --
> 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]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/4ec4d623-5aa0-40a1-9d2a-d12ae7c1177cn%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/4ec4d623-5aa0-40a1-9d2a-d12ae7c1177cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b2ced333-6bbe-4794-d457-8d5c3e0be927%40linuxia.de.
OpenPGP_signature
Description: OpenPGP digital signature
