mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Change example syntax on unarchive module
This commit is contained in:
parent
d7e9fbe631
commit
c5921612d1
1 changed files with 12 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue