bootstrap ansible on windows 10

Published: δΈ‰ 13 十月 2021
By jlz

In ansible.

  • 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

  1. ansible module psexec requires:
    1. pypsexec
    2. smbprotocol[kerberos] for optional Kerberos authentication
  2. psexec can be installed by pip, you don't need Kerberos authentication for now. bash ansible-galaxy collection install community.windows pip install pypsexec

links

social