excludes not work as expected with find module in ansible playbook
51 views
Skip to first unread message
Nithin Subbaraj
unread,
Jan 13, 2021, 9:58:11 AM1/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
I have created an ansible playbook which finds files older than 7 days and zips the files.
Also trying to exclude files from particular directory but not able to find.
I am not able to the exclude the files under sub directory ,it is also getting zipped I am able to successfully exclude the already zipped files but not a sub directory under the path
using excludes in find module for compressing files older than 7 days
Stefan Hornburg (Racke)
unread,
Jan 13, 2021, 10:08:41 AM1/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
I am able to exclude the gzip files but not the delete directory files under
/home/nsubbaraj/replicate/vol/gunnsc01/prod/scoreout/
Stefan Hornburg (Racke)
unread,
Jan 13, 2021, 10:30:38 AM1/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
I think the values for "excludes" need to be relative to the path(s), so try "delete"
instead of "/home/nsubbaraj/replicate/vol/gunnsc01/prod/scoreout/delete".
Regards
Racke
>
> On Wednesday, 13 January 2021 at 20:38:41 UTC+5:30 brae...@gmail.com wrote:
>
> On 1/13/21 3:58 PM, Nithin Subbaraj wrote:
> >
> > I have created an ansible playbook which finds files older than 7 days and zips the files.
> > Also trying to exclude files from particular directory but not able to find.
> >
> > I am not able to the exclude the files under sub directory ,it is also getting zipped
> > I am able to successfully exclude the already zipped files but not a sub directory under the path
> >
> > using excludes in find module for compressing files older than 7 days
>
> Please share your playbook.
>
> 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
> > ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/ansible-project/0378a412-1a74-48d2-875a-45ccff472a8cn%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/0378a412-1a74-48d2-875a-45ccff472a8cn%40googlegroups.com>
> >
> --
> 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
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit