On Thursday, February 27, 2014 8:54:21 PM UTC-8, Jason Sheedy wrote:
>
> Hi guys,
> I'm quite new to Ansible and would like to perform the following in an 
> idempotent fashion. I would basically like to minimise the number of 
> downloads I need to perform from the web for certain file assets, so my 
> plan is to download them once to an asset server and then retrieve them 
> from there for all the target hosts in our cluster.
>
> As far as I know the flow would go something like this.
>
> # does file exist on target host
>   # if yes exit
>   # if no retrieve from asset server
> # does file exist on asset server
> # if not download from web to asset server
> # copy file from asset server to target host
>
> Are there any modules I could use to do this or are there any other 
> recommendations on best practices for this scenario?
>
>
the copy module will also check if the file exists on the target server and 
not copy it if it is already there... CAVEAT, if you intend to modify the 
file on the target server then it will be replaced with the original if any 
of these modules detect that it is different.  (i.e it will checksum the 
two files and only if they don't match will it copy the source over.

Adam

Adam 

-- 
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/a42f7831-f961-485f-a39b-0e89babb50c7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to