mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Added support for module_formatter (in ansible/hacking/)
This commit is contained in:
parent
f500eeec1d
commit
3035394159
3 changed files with 37 additions and 21 deletions
6
Makefile
6
Makefile
|
@ -1,9 +1,10 @@
|
|||
#!/usr/bin/make
|
||||
SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
||||
FORMATTER=../ansible/hacking/module_formatter.py
|
||||
|
||||
all: clean docs
|
||||
|
||||
docs: clean
|
||||
docs: clean modules
|
||||
./build-site.py
|
||||
|
||||
viewdocs: clean
|
||||
|
@ -24,3 +25,6 @@ clean:
|
|||
|
||||
.PHONEY: docs clean
|
||||
|
||||
modules: $(FORMATTER) ../ansible/hacking/templates/rst.j2
|
||||
$(FORMATTER) -t rst --template-dir=../ansible/hacking/templates --module-dir=../ansible/library -o rst/modules/
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ Let's see what's available in the Ansible module library, out of the box:
|
|||
.. include:: modules/get_url.rst
|
||||
.. include:: modules/git.rst
|
||||
.. include:: modules/group.rst
|
||||
.. include:: modules/ini_file.rst
|
||||
.. include:: modules/lineinfile.rst
|
||||
.. include:: modules/mount.rst
|
||||
.. include:: modules/mysql_db.rst
|
||||
|
|
|
@ -1,29 +1,40 @@
|
|||
.. _get_url:
|
||||
|
||||
get_url
|
||||
```````
|
||||
````````````````````````
|
||||
|
||||
Downloads files from http, https, or ftp to the remote server. The remote server must have direct
|
||||
access to the remote resource.
|
||||
.. 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.
|
||||
|
||||
|
||||
============== ========== ========== ============================================================
|
||||
parameter required default comments
|
||||
============== ========== ========== ============================================================
|
||||
url yes None HTTP, HTTPS, or FTP URL
|
||||
dest yes None absolute path of where to download the file to.If *dest* is a directory, the basename of the file on the remote server will be used. If a directory, *thirsty=yes* must also be set.
|
||||
thirsty no if ``yes``, will download the file every time and replace the file if the contents change. if ``no``, the file will only be downloaded if the destination does not exist. Generally should be ``yes`` only for small local files. prior to 0.6, acts if ``yes`` by default.
|
||||
others all arguments accepted by the ``file`` module also work here
|
||||
============== ========== ========== ============================================================
|
||||
|
||||
|
||||
|
||||
|
||||
FIXME: examples!
|
||||
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
This module doesn't support proxies or passwords.
|
||||
|
||||
Also see the ``template`` module.
|
||||
|
||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||
| parameter | required | default | comments |
|
||||
+====================+==========+=========+============================================================================+
|
||||
| url | yes | | http, https, or ftp URL |
|
||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||
| dest | yes | | absolute path of where to download the file to. If dest is a directory, |
|
||||
| | | | the basename of the file on the remote server will be used. If a |
|
||||
| | | | directory, thirsty=yes must also be set. |
|
||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||
| thirsty | no | 'no' | (new in 0.7) if yes, will download the file every time and replace the |
|
||||
| | | | file if the contents change. if no, the file will only be downloaded |
|
||||
| | | | if the destination does not exist. Generally should be 'yes' only for |
|
||||
| | | | small local files. prior to 0.6, acts if 'yes' by default. |
|
||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||
| OTHERS | no | | all arguments accepted by the file module also work here |
|
||||
+--------------------+----------+---------+----------------------------------------------------------------------------+
|
||||
|
||||
Example action from Ansible :doc:`playbooks`::
|
||||
|
||||
- action: get_url url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0444
|
||||
|
||||
get_url url=http://example.com/path/file.conf dest=/etc/foo.conf mode=0440
|
||||
|
||||
|
|
Loading…
Reference in a new issue