On Fri, Mar 8, 2019 at 10:20 AM <[email protected]> wrote:
>
> hi all,
>
> Why when i run this task :
>
> - name: Find /var/log files equal or greater than 10 megabytes ending with 
> .old or .log.gz
>   find:
>     paths: /{{ role_path }}/files/groups/
>     patterns: '*&*.txt'
>   register: mes_fichiers_speciaux
>   delegate_to: localhost
>
> - debug:
>     var: mes_fichiers_speciaux
>
> my variable "mes_fichiers_speciaux" have this result :
>
> "atime": 1552039858.9219189,
>                 "ctime": 1552039858.9179187,
>                 "dev": 65027,
>                 "gid": 1003,
>                 "gr_name": "ansible",
>                 "inode": 125053,
>                 "isblk": false,
>                 "ischr": false,
>                 "isdir": false,
>                 "isfifo": false,
>                 "isgid": false,
>                 "islnk": false,
>                 "isreg": true,
>                 "issock": false,
>                 "isuid": false,
>                 "mode": "0644",
>                 "mtime": 1552039858.9179187,
>                 "nlink": 1,
>                 "path": "//home/my_user/roles/http/files/groups/members.txt",
>                 "pw_name": "ansible",
>                 "rgrp": true,
>                 "roth": true,
>                 "rusr": true,
>                 "size": 76,
>                 "uid": 1003,
>                 "wgrp": false,
>                 "woth": false,
>                 "wusr": true,
>                 "xgrp": false,
>                 "xoth": false,
>                 "xusr": false
>
> so i must have this result only :
>
> members.txt         ==> Who is the content of my repertory /{{ role_path 
> }}/files/groups/
>
>
> Than kyou very much !!
>
> Regards,
>
      Correct me if I am wrong, but you are looking for lines in the
log files that match the pattern, right? If that is the case, do you
mind providing one of the lines from the log file that matches the
search? I think it is a matter of chopping the line down to get the
string you want. But I could be wrong, hence why I want to see the
line in question.

You can sanitize any sensitive entries in the line if you want; I just
want to have a feeling of what you are looking for so I can offer
suggestions.

>
>
> --
> 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/a447fa2a-4e4d-4a17-8a0b-a2cbb3a4fa54%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAHEKYV7i%3Dx8md9tDqtGSXhz3Q0mVcWNUABAVL2zxbEw%3DDb_B-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to