-
to be updated, I don't have time recently, I am reading libp2p source code and documentation lately.
-
set network connection profile, more at here
- enable smb v2/v3 protocol, more at here
- disable firewall, more at here, or you can only allow 445 port income from certain hosts.
powershell Set-NetConnectionProfile -NetworkCategory "Private" Set-SmbServerConfiguration -EnableSMB2Protocol $true Set-NetFirewallProfile -Profile Private -Enabled False
Now you should be able to use ansible psexec module to execute command on this windows machine.
The document of ansible module psexec says: * Runs a remote command from a Linux host to a Windows host without WinRM being set up. * Can be run on the Ansible controller to bootstrap Windows hosts to get them ready for WinRM. So we can get this windows machine ready for WinRM using psexec module
- ansible module psexec requires:
- pypsexec
- smbprotocol[kerberos] for optional Kerberos authentication
- psexec can be installed by pip, you don't need Kerberos authentication for now.
bash ansible-galaxy collection install community.windows pip install pypsexec