From 6ea87c583b0d3fe7abdd85c061b9a83cbd502f7d Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Wed, 12 Oct 2016 15:41:08 -0400 Subject: [PATCH] Change examples syntax on fetch module --- lib/ansible/modules/files/fetch.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/files/fetch.py b/lib/ansible/modules/files/fetch.py index ad34964217e..9b3f07827be 100644 --- a/lib/ansible/modules/files/fetch.py +++ b/lib/ansible/modules/files/fetch.py @@ -65,7 +65,7 @@ options: will use the basename of the source file, similar to the copy module. Obviously this is only handy if the filenames are unique. requirements: [] -author: +author: - "Ansible Core Team" - "Michael DeHaan" notes: @@ -79,14 +79,25 @@ notes: EXAMPLES = ''' # Store file into /tmp/fetched/host.example.com/tmp/somefile -- fetch: src=/tmp/somefile dest=/tmp/fetched +- fetch: + src: /tmp/somefile + dest: /tmp/fetched # Specifying a path directly -- fetch: src=/tmp/somefile dest=/tmp/prefix-{{ inventory_hostname }} flat=yes +- fetch: + src: /tmp/somefile + dest: /tmp/prefix-{{ inventory_hostname }} + flat: yes # Specifying a destination path -- fetch: src=/tmp/uniquefile dest=/tmp/special/ flat=yes +- fetch: + src: /tmp/uniquefile + dest: /tmp/special/ + flat: yes # Storing in a path relative to the playbook -- fetch: src=/tmp/uniquefile dest=special/prefix-{{ inventory_hostname }} flat=yes +- fetch: + src: /tmp/uniquefile + dest: special/prefix-{{ inventory_hostname }} + flat: yes '''