Issue 1:
ISSUE TYPE

Bug Report

ANSIBLE VERSION

2.1

OS / ENVIRONMENT

OpenBSD 5.9

SUMMARY

Using unarchvie for tar-archives on OpenBSD (and possibly FreeBSD/NetBSD) causes an error (Unexpected error when accessing exploded file: [Errno 2] No such file or directory).

From looking at the ansible 2.0 output it looks like ansible would make use of the tar argument --diff. OpenBSD and FreeBSD doesn't have an --diff, -d, --compare option for tar.

It runs fine against any Linux host (tested with CentOS 6.8).

STEPS TO REPRODUCE

run unarchive with a tar.gz against OpenBSD 5.9

e.g.

name: unarchive mmonit

unarchive:

copy: no

creates: /usr/local/mmonit-3.5.1

dest: /usr/local

src: https://mmonit.com/dist/mmonit-3.5.1-openbsd-x64.tar.gz

EXPECTED RESULTS

Command works

ACTUAL RESULTS

Command failed.

fatal: [xxx]: FAILED! => {"changed": false, "failed": true, "msg": "Unexpected error when accessing exploded file: [Errno 2] No such file or directory: '/usr/local/mmonit-3.5.1'", "stat": {"exists": false}}

to retry, use: --limit @site.retry

Issue 2:
ISSUE TYPE

Bug

COMPONENT NAME

unarchive module

ANSIBLE VERSION

Ansible on OSX 10.10, installed through Homebrew.

$ ansible --version
ansible 2.1.0.0
config file =
configured module search path = Default w/o overrides

CONFIGURATION

Not settings changed (to my knowledge ;-)).

OS / ENVIRONMENT

OSX 10.10, Homebrew

SUMMARY

When executing the play pasted below Ansible fails when excuting the unarchive command.

EDIT:

This is a regression because it happens with my existing plays which worked perfectly not long ago. I am pretty sure that this problem did not exist in the Ansible 2.0.x release on OSX using Homebrew.

STEPS TO REPRODUCE

Copy the play below into a file

Download the archive file (http://share.astina.io/openssl-certs.tar.gz) and put it besides the file. Alternatively you can just create your own archive, I guess the contents are irrelevant (maybe it is relevant it being a tar.gz archive)

Run ansible-playbook -vvvv main.yml

---

- name: Test unarchive
hosts: 127.0.0.1
connection: local
tasks:
- name: Create destination folder
file: path=test-certificates state=directory

- name: Install public certificates for OpenSSL
unarchive: src=openssl-certs.tar.gz dest=test-certificates creates=test-certificates/VeriSign_Universal_Root_Certification_Authority.pem

EXPECTED RESULTS

The play runs through and in the play's directory there is a directory called test-certificates with the contents of the archive.

ACTUAL RESULTS

Ansible fails with the following error:

fatal: [127.0.0.1]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"backup":
null, "content": null, "copy": true, "creates":
"test-certificates/VeriSign_Universal_Root_Certification_Authority.pem", "delimiter": null, "dest":
"test-certificates", "directory_mode": null, "exclude": [], "extra_opts": [], "follow": false, "force": null,
"group": null, "keep_newer": false, "list_files": false, "mode": null, "original_basename":
"openssl-certs.tar.gz", "owner": null, "regexp": null, "remote_src": null, "selevel": null, "serole": null,
"setype": null, "seuser": null, "src":
"/Users/raffaele/.ansible/tmp/ansible-tmp-1465980002.6-168001143856730/source"}}, "msg":
"Unexpected error when accessing exploded file: [Errno 2] No such file or directory:
'test-certificates/ACCVRAIZ1.pem'", "stat": {"exists": false}}