Skip to content

Ansible: unpack a file on the remote host

Trying to unpack a file on the remote host using Ansible might end in an error message:

fatal: [192.168.0.188]: FAILED! => {"failed": true, "msg": "ERROR! file or module does not exist: /tmp/test.zip"}

I'm using Ansible 2.0.0.2 here, and have previously copied "test.zip" to the host (yes, I know, the unarchive module can do the copy as well). Now I'm trying to unpack it:

- name: unzip test.zip archive
  unarchive: src=/tmp/test.zip dest=/tmp/test-tmp-install remote_src=yes

This fails, even though I specify "remote_src" and tell Ansible that the file is already on the remote host.

 

Continue reading "Ansible: unpack a file on the remote host"