I've been looking into similar stuff with ansible.  It seems like there is 
a problem with the archive module in general (as of version 2.4, not sure 
if its been fixed yet).  I saw on their git hub that a pull request that 
fixes the archive module exclude_path option has been put up, but I don't 
think its been merged into the code yet.

The problem has to do with exactly how the items in the exclude_path 
interact with the items in the path.  As far as I can tell it makes 
exclude_path extremely hard to use and almost useless, but then again I 
don't fully understand the problem so maybe I just don't see the 'correct' 
way to format to work around the issue.

I've been trying to think of a work-around that I like for the current 
tarball I want to create and I stumbled on this hoping to find someone who 
had already come up with a good work-around.
My leading thoughts are:
- try to do it with the shell or command module and the tar command
- use a bunch of smaller ansible file copy operations to create a staging 
directory that looks like what I want and then tar up that

I don't really like either which is why I was hoping to find a better 
work-around....

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/dee159cc-60e5-4110-b724-4e003d69f9b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to