How to connect ansible on Linux to Windows server using Windows Management Instrumentation (WMI)

79 views
Skip to first unread message

Mohtashim S

unread,
Sep 16, 2021, 5:49:03 PM9/16/21
to Ansible Project

I have a shared Windows drive where a few files are kept.

I have ansible running on Linux which need to connect to the Windows server and download those files.

As per the organization policy WINRM is not allowed and the suggestion of using Windows Management Instrumentation (WMI) to connect from Linux ansible to Windows was given.

I'm not aware nor did I find any document despite searching on google for the steps to connect from Ansible(Linux) to remote Windows server using WMI.

Once connected I will try to manage to download the files. However, i need help with the connectivity part.

Can you please guide me with the steps or any alternate if possible.

Wei-Yen Tan

unread,
Sep 16, 2021, 5:50:46 PM9/16/21
to ansible...@googlegroups.com
Ansible needs winrm.  Can't use wmi 

From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of Mohtashim S <mohta...@gmail.com>
Sent: Friday, September 17, 2021 9:49:03 AM
To: Ansible Project <ansible...@googlegroups.com>
Subject: [ansible-project] How to connect ansible on Linux to Windows server using Windows Management Instrumentation (WMI)
 
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/bfb604b1-3cda-4e60-8418-6acad3f2c64an%40googlegroups.com.

Wei-Yen Tan

unread,
Sep 16, 2021, 5:53:36 PM9/16/21
to ansible...@googlegroups.com
What is their reasoning for that policy 

From: ansible...@googlegroups.com <ansible...@googlegroups.com> on behalf of Mohtashim S <mohta...@gmail.com>
Sent: Friday, September 17, 2021 9:49:03 AM
To: Ansible Project <ansible...@googlegroups.com>
Subject: [ansible-project] How to connect ansible on Linux to Windows server using Windows Management Instrumentation (WMI)
 
--

Chris Gallagher

unread,
Sep 30, 2021, 11:57:25 AM9/30/21
to Ansible Project
Look into using SSH or (yuck) PSRP

John Veliss

unread,
Sep 30, 2021, 5:48:40 PM9/30/21
to ansible...@googlegroups.com
Sounds like you want to connect a linux server to a windows share, try looking up Linux connect to smb of cifs share

--
Reply all
Reply to author
Forward
0 new messages