summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Doran <sdoran@ansible.com>2016-10-12 17:44:47 -0400
committerSam Doran <sdoran@ansible.com>2016-11-15 14:23:35 -0500
commitc2db9fa4148b6ba62ec7bc6b991b28946ea173a5 (patch)
tree72a5e26a3ef2aa7810ab9e047006223cb062ffae
parenta4cddac368976f7fd7f97f5af0cf59d7fd032dfd (diff)
downloadansible-modules-core-c2db9fa4148b6ba62ec7bc6b991b28946ea173a5.tar.gz
Change example syntax on unarchive module
-rw-r--r--files/unarchive.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/files/unarchive.py b/files/unarchive.py
index b51d3979..3a69cc33 100644
--- a/files/unarchive.py
+++ b/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