You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
When using the exclude parameter to exclude various directories, I get an error that one of my excluded directories does not exist even though it does. However, when I use ignore_errors, the directory does get successfully excluded in the unarchive on the target machine.
STEPS TO REPRODUCE
Create a basic unarchive playbook that grabs a tar.gz file and excludes various directories:
- name: download and extract a tar
unarchive:
src: http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-2.4.5.tar.gz
dest: /tmp
copy: no
exclude: httpd,iptables,misc,supervisor,restore
EXPECTED RESULTS
All five of those directories are not included in the unarchive operation
A recent change (#3575) has broken the --exclude functionality by implementing a pure-python files_in_archive implementation which is incompatible with gtar's pattern matching. @abadger Can we please undo this broken PR #3575 ? See: #3575 (comment)
@michelleperz Please use a YAML list, not comma-seperated entries, something like:
exclude:
- path/to/file
- path/to/dir/
We should probably improve the documentation to make this clear.
ISSUE TYPE
COMPONENT NAME
unarchive exclude parameter
ANSIBLE VERSION
CONFIGURATION
No changes
OS / ENVIRONMENT
RHEL 7 managing RHEL 7
SUMMARY
When using the exclude parameter to exclude various directories, I get an error that one of my excluded directories does not exist even though it does. However, when I use ignore_errors, the directory does get successfully excluded in the unarchive on the target machine.
STEPS TO REPRODUCE
EXPECTED RESULTS
All five of those directories are not included in the unarchive operation
ACTUAL RESULTS
The directory that fails is also arbitrary. If I take out httpd from my exclude list, another directory will fail with the same error.
The text was updated successfully, but these errors were encountered: