Ansible 2.0 window modules

38 views
Skip to first unread message

Quang Truong

unread,
Mar 31, 2016, 9:59:46 PM3/31/16
to Ansible Project
Hi all,

I'm using Ansible 2.0 but I have problem with:
- win_file: can't create new directory

sample playbook
- name: create Source directory
  win_file: path=C:\MySource state=directory

- win_service: can't manage windows service (no affect). The input name is the service name (service name is the same with service display name)

sample playbook:
- name: update service My_Service stopped
  win_service:
    name: My_Service
state: stopped

Do you have any idea?

Thanks,
Quang

Quang Truong

unread,
Mar 31, 2016, 10:18:32 PM3/31/16
to Ansible Project
Please disregard about the win_file. I can make it run. My typo error!

Quang Truong

unread,
Mar 31, 2016, 10:50:46 PM3/31/16
to Ansible Project
For win_service: put the value in "" then it works :D

田村泰晴

unread,
Apr 5, 2016, 9:50:11 PM4/5/16
to Ansible Project
I do not get off with a strange sentence.
I think that it is OK if I escape "\"
win_file: path="C:\\MySource" state=directory

2016年4月1日金曜日 10時59分46秒 UTC+9 Quang Truong:
Reply all
Reply to author
Forward
0 new messages