<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">2.1</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">OpenBSD 5.9</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">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).<br>
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.</p>
<p dir="auto">It runs fine against any Linux host (tested with CentOS 6.8).</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">run unarchive with a tar.gz against OpenBSD 5.9</p>
<p dir="auto">e.g.</p>
<ul dir="auto">
<li>name: unarchive mmonit<br>
unarchive:<br>
copy: no<br>
creates: /usr/local/mmonit-3.5.1<br>
dest: /usr/local<br>
src: <a href="https://mmonit.com/dist/mmonit-3.5.1-openbsd-x64.tar.gz" rel="nofollow">https://mmonit.com/dist/mmonit-3.5.1-openbsd-x64.tar.gz</a></li>
</ul>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">Command works</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Command failed.</p>
<p dir="auto">fatal: [xxx]: FAILED! =&gt; {"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}}<br>
to retry, use: --limit @site.retry</p>
<h5 dir="auto">ISSUE TYPE</h5>
<p dir="auto">Bug</p>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">unarchive module</p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">Ansible on OSX 10.10, installed through Homebrew.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible --version
ansible 2.1.0.0
  config file = 
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">$ ansible --version
ansible 2.1.0.0
  config file = 
  configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">Not settings changed (to my knowledge ;-)).</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">OSX 10.10, Homebrew</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">When executing the play pasted below Ansible fails when excuting the unarchive command.</p>
<p dir="auto">EDIT:<br>
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.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<ol dir="auto">
<li>Copy the play below into a file</li>
<li>Download the archive file (<a href="http://share.astina.io/openssl-certs.tar.gz" rel="nofollow">http://share.astina.io/openssl-certs.tar.gz</a>) 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 <code class="notranslate">tar.gz</code> archive)</li>
<li>Run <code class="notranslate">ansible-playbook -vvvv main.yml</code></li>
</ol>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
---

- 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"><pre class="notranslate"><code class="notranslate">
---

- 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
</code></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">The play runs through and in the play's directory there is a directory called <code class="notranslate">test-certificates</code> with the contents of the archive.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">Ansible fails with the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [127.0.0.1]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;invocation&quot;: {&quot;module_args&quot;: {&quot;backup&quot;:
null, &quot;content&quot;: null, &quot;copy&quot;: true, &quot;creates&quot;:
&quot;test-certificates/VeriSign_Universal_Root_Certification_Authority.pem&quot;, &quot;delimiter&quot;: null, &quot;dest&quot;:
&quot;test-certificates&quot;, &quot;directory_mode&quot;: null, &quot;exclude&quot;: [], &quot;extra_opts&quot;: [], &quot;follow&quot;: false, &quot;force&quot;: null,
&quot;group&quot;: null, &quot;keep_newer&quot;: false, &quot;list_files&quot;: false, &quot;mode&quot;: null, &quot;original_basename&quot;:
&quot;openssl-certs.tar.gz&quot;, &quot;owner&quot;: null, &quot;regexp&quot;: null, &quot;remote_src&quot;: null, &quot;selevel&quot;: null, &quot;serole&quot;: null,
&quot;setype&quot;: null, &quot;seuser&quot;: null, &quot;src&quot;:
&quot;/Users/raffaele/.ansible/tmp/ansible-tmp-1465980002.6-168001143856730/source&quot;}}, &quot;msg&quot;:
&quot;Unexpected error when accessing exploded file: [Errno 2] No such file or directory:
'test-certificates/ACCVRAIZ1.pem'&quot;, &quot;stat&quot;: {&quot;exists&quot;: false}}"><pre class="notranslate"><code class="notranslate">fatal: [127.0.0.1]: FAILED! =&gt; {"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}}
</code></pre></div>