Transfer a file from a virtual machine managed by a Vmware Vcenter server to Ansible controller using ansible.

15 views
Skip to first unread message

Mick st john

unread,
Mar 28, 2017, 9:03:39 AM3/28/17
to Ansible Project
I am trying to copy a file from a virtual machine which is managed by a vCenter server to my Ansible controller.
I don't want to use "fetch" module as it needs SSH connectivity. Is there any way I could transfer a file by not using fetch(SSH).

 I've been through some modules like vsphere_guest but, did not find anything that transfer files from a VM to ansible controller.



J Hawkesworth

unread,
Mar 29, 2017, 7:46:33 AM3/29/17
to Ansible Project
Well for what its worth, when you are targeting windows hosts, fetch works, but doesn't use ssh, it uses winrm.  But I'm guessing you aren't using a windows vm?

A more viable option would be to add some kind of web server to your virtual machine and then retrieve files from it onto your ansible controller using get_url

I'm curious what's so bad about ssh connectivity in this case though - surely you make plenty of use of that controlling your machines via ansible?

Jon
Reply all
Reply to author
Forward
0 new messages