You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/files
Dag Wieers 983cdd00bc Making unarchive idempotent (#3307)
* WIP: Making unarchive idempotent

Currently unarchive is not idempotent and has many rough edges and bugs.
The current release is a workable improvement on many fronts:

- zip support is now idempotent (but gtar lacks check-mode)
- New option `exclude` to exclude specific paths/files
- New option `keep_newer` to exclude newer files on target
- New option `extra_opts` to influence unzip/gtar (like synchronize module)

The following items are still ongoing:

- Implement CRC32 support for .zip files
- Re-implement the zip support using native zipfile module
- Re-implement the gtar support using native tarfile/gzip/bz2 modules (lzma external)
- Implement check-mode (works in gzip, but fails using gtar)
- Implement diff-mode (discuss an appropriate output model, like synchronize module)

The re-implementation of unzip/gtar support using native python modules will not only simplify the codebase, additional functionality can be implemented correctly and identically, which is currently not possible. (Other archives could be implemented using native modules equally, incl. options)

* Assorted fixes to zip support (during quality checks)

- Support both rw---- and rwx--- permstr
- Better file type support (more qa needed)
- Symlink support
- Include fix from #3229

* Implement zip diff-mode (itemized change) and avoid changes permissions every time (!)

This commit implements:
- rsync-compatible itemized-change output in diff-mode (using zip)
- no longer changing permissions unconditionally (when idempotent)

* Small fixes to itemized change output

* Fixes to user/group ownership changes

- The implementation of user/group ownership is a bit more complex for idempotency
- We report when a ZIP file incorrectly tags a directory as a file/link
- We only offer diff output when there is a change

* Fix the handling of includes and excludes for unzip

* Remove test output from output (confuses easily)

* Logic and performance improvements to ownership handling, and umask fix

* Handle special files (type '?')

* Make exceptions compatible with python 2.4

* Implement CRC32 support

* Revert some unintended/unknown changes ?

* Taking over maintenance as offered by current maintainer

* Fix support for white-spaces in filenames

* Remove/rename incorrect regex

* Ensure that fat executables end up with execute permission

* Remove check_result from output when unchanged

* When unarchiving as a user, or when owner/group/mode is supplied --diff is insufficient

Only way to be sure is to check request with what is on disk (as we do for zip).
Leave this up to set_fs_attributes_if_different() instead of inducing a (false) change

* By default, don't send confusing check_results in verbose output

This fixes #74.
9 years ago
..
__init__.py package files 10 years ago
acl.py Remove duplicate documentation fields 9 years ago
assemble.py fixed exit json 9 years ago
copy.py Merge pull request #2647 from bertvv/issue_2498 9 years ago
fetch.py Add note about precautions of using become with fetch. Addresses https://github.com/ansible/ansible/issues/14064 9 years ago
file.py fixed typo, now correctly check isdir 9 years ago
find.py removed 'overquoting' of example 9 years ago
ini_file.py ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol 9 years ago
lineinfile.py Merge pull request #2896 from towolf/add_diff_to_lineinfile 9 years ago
replace.py added follow to specific modules that support it 9 years ago
stat.py Change one param to be of type path 9 years ago
synchronize.py added rsync protocol support (#1999) 9 years ago
template.py Improve doc accuracy of template module 9 years ago
unarchive.py Making unarchive idempotent (#3307) 9 years ago
xattr.py Set name to type path so that tilde and env vars are expanded 9 years ago