Hello All,

Following are my details regarding copying from the remote machine, I have 
to copy the propertie file from the remote test server to the local ansible 
server.

I have achieved this task using ssh command as below:

sshpass -p jpass scp -o StrictHostKeyChecking=no 
"testuser@testmachine:/opt/testserver/jetty/jetty-distribution-9.3/etc/core/application.properties"
 
"/opt/jenkins/sharedspace/BackupRestore/resources"

However, my I want this to be converted to ansible copy format like this 
but somehow I am not able to copy that remote file. (Only thing is one 
should copy that file as become_user: root which I am already doing)


- hosts: testserver.testing.com (This is ansible server host)
  remote_user: sampleuser
 - name: webapps copy
   become: yes
   become_user: root
   copy:
src: 
/opt/testserver/jetty/jetty-distribution-9.3/etc/core/application.properties
     dest: /opt/jenkins/sharedspace/BackupRestore/resources
     owner: testuser
     group: testuser

*Getting a below issue:*

An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: AnsibleFileNotFound: Could not find or access 
'/opt/testserver/jetty/9.3/webapps/

Could anyone know on this more?

Thanks in Advanced.

Thanks,
Sachi

-- 
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient. Any 
review, use, distribution, or disclosure by others is strictly prohibited. 
If you are not the intended recipient (or authorized to receive information 
for the intended recipient), please contact the sender by reply e-mail and 
delete all copies of this message.





-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to