# setting up windows host on a production environment

**URL:** <https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [December 7, 2020, 11:39am UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294 "2020-12-07T11:39:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_Gowda](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@Deepak\_Gowda](https://forum.ansible.com/u/Deepak_Gowda)\
**Post date:** [December 7, 2020, 11:39am UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294/1 "2020-12-07T11:39:13Z")

</div>

Hi All,

How can i setup windows host to communicate with Ansible control node on a production environment securely.Can i run the below script with  
[switch]$DisableBasicAuth = $true

[https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1](https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1)

I am trying to implement Ansible on my production environment with all the security features in [place.Cn](http://place.Cn) anyone guide me with the steps.

Thanks  
Deepak

---

<div class="post-metadata">

**Author:** ![Shashikumar\_V](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Shashikumar\_V](https://forum.ansible.com/u/Shashikumar_V)\
**Post date:** [December 7, 2020, 1:55pm UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294/2 "2020-12-07T13:55:31Z")

</div>

Hi Deepak,

You can use ntlm method.

---

<div class="post-metadata">

**Author:** ![Deepak\_Gowda](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@Deepak\_Gowda](https://forum.ansible.com/u/Deepak_Gowda)\
**Post date:** [December 8, 2020, 10:25am UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294/3 "2020-12-08T10:25:27Z")

</div>

HI Shashi ,

Please let me know the steps to configure it.

Thanks  
Deepak

---

<div class="post-metadata">

**Author:** ![Ankit2](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@Ankit2](https://forum.ansible.com/u/Ankit2)\
**Post date:** [December 8, 2020, 10:48am UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294/4 "2020-12-08T10:48:19Z")

</div>

You need to use the following variables/extra vars for your playbook to connect to windows hosts ofcourse after the initial configuration on windows server to accept incoming connection is done.

**ansible\_connection: winrm**  
**ansible\_winrm\_message\_encryption: auto**  
**ansible\_winrm\_port: 5985**  
**ansible\_winrm\_transport: ntlm**

---

<div class="post-metadata">

**Author:** ![Shashikumar\_V](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Shashikumar\_V](https://forum.ansible.com/u/Shashikumar_V)\
**Post date:** [December 10, 2020, 4:08am UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294/5 "2020-12-10T04:08:05Z")

</div>

Hi Deepak,

Is the issue resolved ? . Are you able to connect to windows hosts from ansible ?. If not i can help you .

Thanks,  
Shashi

---

<div class="post-metadata">

**Author:** ![Deepak\_Gowda](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@Deepak\_Gowda](https://forum.ansible.com/u/Deepak_Gowda)\
**Post date:** [December 24, 2020, 6:30am UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294/6 "2020-12-24T06:30:27Z")

</div>

Hi Shashi,

The issue is not resolved yet,I am thinking to use kerbores since i have AD.Can you please help me.

Thanks  
Deepak

---

<div class="post-metadata">

**Author:** ![Shashikumar\_V](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Shashikumar\_V](https://forum.ansible.com/u/Shashikumar_V)\
**Post date:** [December 24, 2020, 6:44am UTC](https://forum.ansible.com/t/setting-up-windows-host-on-a-production-environment/34294/7 "2020-12-24T06:44:25Z")

</div>

Hi Deepak,

Use below variables and also the check the ansible is using correct python and enable the ports in windows hosts.  
ansible\_connection: winrm  
ansible\_port: 5985  
ansible\_winrm\_scheme: http  
ansible\_winrm\_server\_cert\_validation: ignore  
ansible\_winrm\_transport: ntlm

Thanks,  
Shashi
