ansible/docsite/rst/modules/fetch.rst

43 lines
1.2 KiB
ReStructuredText
Raw Normal View History

.. _fetch:
fetch
2012-10-04 02:58:27 +02:00
``````````````````````````````
2012-10-04 02:58:27 +02:00
.. versionadded:: 0.2
2012-10-04 02:58:27 +02:00
This module works like ``copy``, but in reverse. It is used for fetching files from remote machines and storing them locally in a file tree, organized by hostname.
2012-10-04 02:58:27 +02:00
.. raw:: html
2012-10-04 02:58:27 +02:00
<table>
<tr>
<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>
</tr>
<tr>
<td>dest</td>
<td>yes</td>
<td></td>
<td><ul></ul></td>
<td>A directory to save the file into. For example, if the <em>dest</em> directory is <code>/backup</code> a src file named <code>/etc/profile</code> on host <code>host.example.com</code>, would be saved into <code>/backup/host.example.com/etc/profile</code></td>
</tr>
<tr>
<td>src</td>
<td>yes</td>
<td></td>
<td><ul></ul></td>
<td>The file on the remote system to fetch. This must be a file, not a directory. Recursive fetching may be supported in a later release.</td>
</tr>
</table>
.. raw:: html
<p>Example from Ansible Playbooks</p> <p><pre>
fetch src=/var/log/messages dest=/home/logtree
2012-10-04 02:58:27 +02:00
</pre></p>
<br/>