What we do in similar cases is: Extract to /whateverfolder/wordpresses/
Symlink /var/www/mysite to /whateverfolder/workpresses/wordpress This way you can use the Ansible standard modules unarchive and file. Hope this helps. Lars On Tuesday, January 27, 2015 at 2:44:10 PM UTC+1, Warren Seine wrote: > > Hi, > > No matter what I do, I cannot find a proper way to extract the content of > a directory of a .zip file to a specific directory, without breaking > idempotence. > > Typically, wordpress-4.1.zip contains a "wordpress" directory which > contains the files (most archives have a top directory actually). I would > like to extract these files without the top directory (say > wordpress/index.php to /var/www/mysite/index.php). > > In a shell command, I could do a unzip && mv (with a few more tricks > though), but that would trigger every single time. If I add a "creates", it > would not trigger if a specific file changes in the archive (something the > "unarchive" module would properly deal with...). Well, you get it. > > I'm sure I'm not the first one to encounter the issue. How do you deal > with this? > > Regards, > Warren. > -- 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/54b06ccc-b36e-44b4-9d67-3b1284a3dfef%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
