From c5921612d10391d9847d490a8a12faa81f6453aa Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Wed, 12 Oct 2016 17:44:47 -0400 Subject: [PATCH] Change example syntax on unarchive module --- lib/ansible/modules/files/unarchive.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/files/unarchive.py b/lib/ansible/modules/files/unarchive.py index b51d3979c66..3a69cc33b67 100644 --- a/lib/ansible/modules/files/unarchive.py +++ b/lib/ansible/modules/files/unarchive.py @@ -114,13 +114,21 @@ notes: EXAMPLES = ''' # Example from Ansible Playbooks -- unarchive: src=foo.tgz dest=/var/lib/foo +- unarchive: + src: foo.tgz + dest: /var/lib/foo # Unarchive a file that is already on the remote machine -- unarchive: src=/tmp/foo.zip dest=/usr/local/bin remote_src=yes +- unarchive: + src: /tmp/foo.zip + dest: /usr/local/bin + remote_src: yes # Unarchive a file that needs to be downloaded (added in 2.0) -- unarchive: src=https://example.com/example.zip dest=/usr/local/bin remote_src=yes +- unarchive: + src: "https://example.com/example.zip" + dest: /usr/local/bin + remote_src: yes ''' import re @@ -339,7 +347,7 @@ class ZipArchive(object): # Check first and seventh field in order to skip header/footer if len(pcs[0]) != 7 and len(pcs[0]) != 10: continue if len(pcs[6]) != 15: continue - + # Possible entries: # -rw-rws--- 1.9 unx 2802 t- defX 11-Aug-91 13:48 perms.2660 # -rw-a-- 1.0 hpf 5358 Tl i4:3 4-Dec-91 11:33 longfilename.hpfs