# Host not found error while executing copy module

**URL:** <https://forum.ansible.com/t/host-not-found-error-while-executing-copy-module/19724>\
**Category:** Ansible Project\
**Created:** [November 10, 2015, 10:20am UTC](https://forum.ansible.com/t/host-not-found-error-while-executing-copy-module/19724 "2015-11-10T10:20:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diwaakartg\_Ganesh](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Diwaakartg\_Ganesh](https://forum.ansible.com/u/Diwaakartg_Ganesh)\
**Post date:** [November 10, 2015, 10:20am UTC](https://forum.ansible.com/t/host-not-found-error-while-executing-copy-module/19724/1 "2015-11-10T10:20:48Z")

</div>

Ansible version :1.9.4, 1.9.3, 1.9.1,

Using ec2, so specifying pem key in ansible. Cfg

I have used ansible for while, but this error is strange.

Copy module works fine when executing in ad-hoc like the snippet below.  
The below line is just an example.

Ansible instance123 -m copy - a “src= dest= mode =”

But gives “host not found” while executing the same module in playbook.

I checked command module both in playbooks and trying it in ad-hoc also. That works fine.  
I found that version 1.8.2 had this error, and I tried all state versions of 1.9

I find this strange, any help appreciated.
