# Running ansible playbook in windows target

**URL:** <https://forum.ansible.com/t/running-ansible-playbook-in-windows-target/30766>\
**Category:** Ansible Developer\
**Tags:** windows\
**Created:** [July 12, 2019, 9:40am UTC](https://forum.ansible.com/t/running-ansible-playbook-in-windows-target/30766 "2019-07-12T09:40:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saranyasridharan17](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@saranyasridharan17](https://forum.ansible.com/u/saranyasridharan17)\
**Post date:** [July 12, 2019, 9:40am UTC](https://forum.ansible.com/t/running-ansible-playbook-in-windows-target/30766/1 "2019-07-12T09:40:35Z")

</div>

Hi ,

I have used ansible and deployed in the linux host , now I got a new requirement to deploy in windows host. I wanted to try using ssh method ( using openssh in windows) . I have set proper ssh connection and manually able to login. But when I try to run playbook ( sample ping) I am getting error saying log directory could not be created. I have created folder and trying ssh with same user even given full permission to that folder. But playbook is getting . Can anyone help me resolve this issue ? or Am I trying something wrong here? Please guide me with right steps. Thanks in advance.

This is my ansible.cfg config part

```auto
remote_tmp = "C:\Users\srsaranya\Desktop\ansible_logs"

```

This is my playbook:

```auto
- hosts: win
  tasks:
     - ping:

```

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [July 12, 2019, 7:38pm UTC](https://forum.ansible.com/t/running-ansible-playbook-in-windows-target/30766/2 "2019-07-12T19:38:17Z")

</div>

If the target host is a windows host, you should use the win\_ping module not the ping module

Tony Chia
