# Setting up SSL for Windows Remote Nodes

**URL:** <https://forum.ansible.com/t/setting-up-ssl-for-windows-remote-nodes/21788>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 15, 2016, 10:29pm UTC](https://forum.ansible.com/t/setting-up-ssl-for-windows-remote-nodes/21788 "2016-06-15T22:29:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Anderson](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@Jonathan\_Anderson](https://forum.ansible.com/u/Jonathan_Anderson)\
**Post date:** [June 15, 2016, 10:29pm UTC](https://forum.ansible.com/t/setting-up-ssl-for-windows-remote-nodes/21788/1 "2016-06-15T22:29:25Z")

</div>

Control Node:

- CentOS 7

- Ansible 2.1

- pywinrm version from May 19th, 2016

Remote Node:

- Windows 7

- Powershell 3  
Here is everything I’ve picked up so far to get SSL working. Please let me know if each of these are correct or not.

1. I must have pywinrm installed on the management node

2. The /etc/ansible/hosts file on the management node must have something like this

[windows]  
computerName1  
computerName2

1. The directory /etc/ansible/group\_vars must have a YAML file whos name matches the word in brackets above (windows in this case). So /etc/ansible/group\_vars/windows.yml should look something like this

ansible\_user: ansibleAdmin  
ansible\_password: p@$$w0rd  
ansible\_port: 5986  
ansible\_connection: winrm

1. There must be a local account with admin privileges created on each remote node with the same username and password as listed above.

2. A certificate request must be created on a remote node with the IIS manager and submitted to my IT department using exact name as shown above in the windows.yml file. The common name on the certificate request must be something like

[ansibleAdmin.aa.bb.acme.com](http://ansibleAdmin.aa.bb.acme.com)

1. The certificate(s) sent back to me from the IT department must be imported using mmc on each remote node.

2. Each remote node must be running powershell and have downloaded and run [Trond Hindenes powershell script](https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1) for enabling WinRM/PSRemoting

3. If all of this is done correctly I should get a pong from each of my remote nodes when I type my win\_ping request as shown below

$ansible windows -m win\_ping

Is all of this correct? Am I missing anything?

---

<div class="post-metadata">

**Author:** ![Jonathan\_Anderson](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@Jonathan\_Anderson](https://forum.ansible.com/u/Jonathan_Anderson)\
**Post date:** [June 20, 2016, 7:58pm UTC](https://forum.ansible.com/t/setting-up-ssl-for-windows-remote-nodes/21788/2 "2016-06-20T19:58:56Z")

</div>

Okay, it works now. I was missing just one thing. On line 139 of the powershell script I had to hard-code the common name used for my certificate. Like this…

139 $valueset.Add('Hostname", “[ansibleAdmin.aa.bb.acme.com](http://ansibleAdmin.aa.bb.acme.com)”)

where ansibleAdmin is the local account with admin privileges described in step 4 above.
