Ansible module for windows

33 views
Skip to first unread message

Leonid Lee

unread,
Apr 23, 2015, 2:43:04 PM4/23/15
to ansible...@googlegroups.com
Hello.


Is there any way to create modules using python to deploy packages on windows?




I created simple module that prints "Hello world!" to text file. It works on ansible control machine (rhel):
$ ansible localhost -i hosts.yml -m test
127.0.0.1 | success >> {
    "changed": true,
    "msg": "./test.txt"
}



But fails on windows remote machine:
$ ansible ansible-slave -i hosts.yml -m test
192.168.163.137 | FAILED >> {
    "failed": true,
    "msg": "The argument 'C:\\Users\\ansible\\AppData\\Local\\Temp\\ansible-tmp-1429814185.92-235487101584232\\\\test.ps1' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter.\r\n",
    "parsed": false
}




Yassen Damyanov

unread,
Apr 23, 2015, 4:06:05 PM4/23/15
to ansible...@googlegroups.com

On Thursday, April 23, 2015 at 9:43:04 PM UTC+3, Leonid Lee wrote:
Is there any way to create modules using python to deploy packages on windows?

Quoting from the manual (http://docs.ansible.com/intro_windows.html):
"For Windows, ansible modules are implemented in PowerShell."

AFAIK, this is the official and supported way to do things on Windows.

Cheers,
 Y.
Reply all
Reply to author
Forward
0 new messages