trying to enable winrm over https on new VM

I am clining VM with the vmware_guest module.

it works fine and join domain.

but I need to enable winrm over https.

is there way to do this from the runonce or predeployment tasks?

I cant even copy a script over since winrm over https is not enabled

If you’re building from a template, you could bake the winrm changes into the template - you could also use the vmware customization to run the COnfigureRemotingForAnsible.ps1 script I link below

See this page for some in depth on setting things up:https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html

And here’s a script that configures remoting for Ansible:https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1