Getting error while copying file from local mechine to Remote.

Hi I am new to Ansible.

I am trying to copy file from my local machine to remote using ansible i am getting the fallowing error.

172.22.1.75 | FAILED >> {
“failed”: true,
“msg”: “src (or content) and dest are required”
}

I am using the below command :-

ansible webserver -m copy -a “/etc/ansible/test1 dest=/root/suneel/test1”

Thanks
Suneel

Hi Suneel,

Probably a question for Ansible Project mailing list, but I think you just need to check that you have supplied all the parameters that the module requires.

ansible webserver -m copy -a “src=/etc/ansible/test1 dest=/root/suneel/test1”

the copy module wants a src and a dest parameter - see http://docs.ansible.com/ansible/copy_module.html

Hope this helps,

Jon