pip3 install requests-credssp
pip3 install pywinrm
Download ConfigureRemotingForAnsible.ps1
powershell.exe -File ConfigureRemotingForAnsible.ps1 -Verbose -EnableCredSSP
Example hosts file:
cat << EOF > hosts.yml
lansweeper:
hosts:
lansweeper-app:
EOF
Example variables to deploy the CertifyTheWeb ACME client to a Windows server:
cat << EOF > vars.yml
match_host: lansweeper
ansible_connection: winrm
ansible_winrm_transport: credssp
ansible_winrm_server_cert_validation: ignore
package_url: http://192.168.1.1/
ansible_user: "[email protected]"
ansible_password: "password"
package_name: CertifyTheWebSetup_V5.5.6.exe
install_params: /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
license_email: [email protected]
license_key: 00000000-0000-0000-0000-000000000000
EOF
ansible-playbook deploy.yml -i hosts.yml -e @vars.yml
ansible-playbook license.yml -i hosts.yml -e @vars.yml