Andreas,

How about writing a wrapper script that ansible can call and then populate 
the results into a variable to use with get_url.

wget -O - http://www.example.com/software/latest/ | grep zip | cut -d\> -f 
2 | sed -e 's!</a!!g'|sort -u |tail -1

On Thursday, January 15, 2015 at 2:02:49 PM UTC-5, Jeffrey Liu wrote:
>
> +1  
> I'm interested in something like this as well.   Thanks!
>
> On Thursday, January 15, 2015 at 11:27:38 AM UTC-5, Andres Silva wrote:
>>
>> Im writing a playbook to install the latest version of a software. The 
>> latest version will always be in a url like this 
>> http://www.example.com/software/latest But the files in there will have 
>> different names that will append the version of the software. So the 
>> content of that URL location will look like this
>>
>> http://www.example.com/software/latest
>> software.1.1.zip
>>
>> Every so often there will be a new version of the software released and 
>> the file name will change . I dont want to have to change the playbook, 
>> every time the file name changes. And I dont want to keep track of this in 
>> a variable. I just want it to pull the latest every time it runs. 
>>
>> - name: download new software
>>   get_url: url=http://www.example.com/software/latest dest=/opt/software.zip 
>> mode=0755
>>
>> Is there a way to recursively pull all the files there or maybe use a 
>> wild card like *.zip
>>
>> I know I can do it with wget by shelling out. But I was wondering if 
>> there was a way of doing this with the Ansible module
>>
>> wget -r https://www.example.com/files/latest/ -nd -P ~/Desktop/test/ -A 
>> zip
>>
>> Thanks in advance
>>
>>
>>
>>

-- 
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/713b2beb-bf42-4aa5-9177-de883e122827%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to