This sounds like some sort of bug or misconfiguration. Ansible modules are short code files. All of the modules that come with ansible (copy comes with ansible) are written in python and have certain substitutions performed on them. One of those substitutions is changing the shebang line to point to the python interpreter on the remote machine. To do this ansible must find an existing shebang line in the module.
The error you're getting is because ansible was unable to find a shebang line to substitute in the file that it thinks is the copy module.
I've just double checked and the copy module does have the required shebang line: https://github.com/ansible/ansible-modules-core/blob/devel/files/copy.py
Some things to try:
- what version of ansible are you running? We can check to make sure the error isn't present there.
- does this also happen with ad hoc tasks using /usr/bin/ansible?
ansible -I "linux.cloudapp.net," '*' -m copy -a "src=waagent dest=/etc/sudoers.d/waagent owner=root group=root mode=0644" -u root
- does this also happen if you try running ansible from another directory? cd / && ansible[...]
-Toshio
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ab9ed7d3-0c86-43ca-a8c0-c47a1d77e4c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.