Question:
I’m getting this error while Ansible (1.9.2) is trying to unpack the file.
1 2 3 4 5 6 |
19:06:38 TASK: [jmeter | unpack jmeter] ************************************************ 19:06:38 fatal: [jmeter01.veryfast.server.jenkins] => input file not found at /tmp/apache-jmeter-2.13.tgz or /tmp/apache-jmeter-2.13.tgz 19:06:38 19:06:38 FATAL: all hosts have already failed -- aborting 19:06:38 |
I checked on the target server, /tmp/apache-jmeter-2.13.tgz file exists and it has valid permissions (for testing I also gave 777 even though not reqd but still got the above error mesg).
I also checked md5sum of this file (compared it with what’s there on the apache jmeter site) — It matches!
1 2 3 |
# md5sum apache-jmeter-2.13.tgz|grep 53dc44a6379b7b4a57976936f3a65e03 53dc44a6379b7b4a57976936f3a65e03 apache-jmeter-2.13.tgz |
When I’m using tar -xvzf on this file, tar is able to show/extract it’s contents in the .tgz file.
What could I be missing? At this point, I’m wondering unarchive method/module in Ansible must have some bug.
My last resort (if I can’t get unarchive in Ansible to work) would be to use Command: “tar -xzvf /tmp/…..” but I don’t want to do that as my first preference.
Answer:
The default behavior for Unarchive is to find the file on your local system, copy it to the remote, and unpack it. I suspect if you’re getting a file not found error then you need to specify copy=no
in your task.