Hello,

I've created two modules-- one in Python and one in PowerShell for each of 
my remote machines. Of course, as expected, the Python one can run only on 
the remote Linux and the PowerShell-written module can only be used on the 
remote Windows system.

I understand that Python modules can't be run on Windows 
<https://docs.ansible.com/ansible/latest/os_guide/windows_faq.html#can-i-run-python-modules-on-windows-hosts>
 
because winRM will only accept PowerShell modules. However, I managed to 
connect my remote Windows server to my Linux control client via SSH. 
Ansible picks it up perfectly and I haven't run into any issues despite it 
being an experimental feature. This still causes me errors and the python 
module doesn't run the same way it does on Linux. Why? Is there anything 
else I could try so that my custom Python module can be run on both OS's? I 
know that there are some modules from ansible-core that can be run on both 
systems-- how can I do that with my custom modules?

If running a custom python module on windows is a big no-no, how can I get 
my custom PowerShell module to run on Linux? I know that modules can be 
written in any language, but why can't Linux take in the PowerShell module? 
Are there some changes or settings that I can set to make to instruct 
ansible to use PowerShell in Linux? I also have PowerShell downloaded on 
that remote linux machine.

Any suggestions are greatly appreciated! This will save me a lot of time 
just creating one module instead of two for my two remote systems. 

Thanks!

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/495314b1-7820-45bc-a8c3-df152c0853a3n%40googlegroups.com.

Reply via email to