Perhaps you could just turn that zip into a package and use the yum/apt 
ansible module to handle the updates?  Using something like fpm 
(https://github.com/jordansissel/fpm) could quite easily convert a zip into 
a package.  Might make the process easier.

On Tuesday, January 27, 2015 at 8:44:10 AM UTC-5, 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/bb8acf2c-8213-4e42-8cdf-6041fec017b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to