2012-08-13 15:39:00 -04:00
.. _get_url:
get_url
2012-09-28 08:21:33 -04:00
`` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ``
2012-09-26 20:36:48 +02:00
.. versionadded :: 0.6
Downloads files from HTTP, HTTPS, or FTP to the remote server. The remote server must have direct access to the remote resource.
2012-09-27 21:33:55 -04:00
.. raw :: html
<table>
<tr>
2012-09-28 08:21:33 -04:00
<th class="head">parameter</th>
<th class="head">required</th>
<th class="head">default</th>
<th class="head">choices</th>
<th class="head">comments</th>
2012-09-27 21:33:55 -04:00
</tr>
2012-10-03 20:58:27 -04:00
<tr>
2012-09-27 21:33:55 -04:00
<td>url</td>
2012-10-03 20:58:27 -04:00
<td>yes</td>
<td></td>
2012-09-27 21:33:55 -04:00
<td><ul></ul></td>
<td>HTTP, HTTPS, or FTP URL</td>
</tr>
2012-10-03 20:58:27 -04:00
<tr>
2012-09-27 21:33:55 -04:00
<td>dest</td>
2012-10-03 20:58:27 -04:00
<td>yes</td>
<td></td>
2012-09-27 21:33:55 -04:00
<td><ul></ul></td>
<td>absolute path of where to download the file to.If <em>dest</em> is a directory, the basename of the file on the remote server will be used. If a directory, <em>thirsty=yes</em> must also be set.</td>
</tr>
2012-10-03 20:58:27 -04:00
<tr>
2012-09-27 21:33:55 -04:00
<td>thirsty</td>
2012-10-03 20:58:27 -04:00
<td>no</td>
2012-09-27 21:33:55 -04:00
<td>no</td>
<td><ul><li>yes</li><li>no</li></ul></td>
2012-10-03 20:58:27 -04:00
<td>if <code>yes</code>, will download the file every time and replace the file if the contents change. if <code>no</code>, the file will only be downloaded if the destination does not exist. Generally should be <code>yes</code> only for small local files. prior to 0.6, acts if <code>yes</code> by default. (added in Ansible 0.7)</td>
2012-09-27 21:33:55 -04:00
</tr>
2012-10-03 20:58:27 -04:00
<tr>
2012-09-27 21:33:55 -04:00
<td>others</td>
2012-10-03 20:58:27 -04:00
<td>no</td>
2012-09-27 21:33:55 -04:00
<td></td>
<td><ul></ul></td>
<td>all arguments accepted by the <span class='module'>file</span> module also work here</td>
</tr>
2012-10-03 20:58:27 -04:00
</table>
2012-09-27 21:33:55 -04:00
.. raw :: html
2012-10-03 20:58:27 -04:00
<p>Example from Ansible Playbooks</p> <p><pre>
get_url url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
</pre></p>
2012-09-27 21:33:55 -04:00
<br/>
2012-09-26 20:36:48 +02:00
2012-10-03 20:58:27 -04:00
.. raw :: html
<h4>Notes</h4>
<p>This module doesn't yet support configuration for proxies or passwords.</p>