Hi Rob,
I have cloned ansible-modules-extras to a separate directory. Under that
directory ../modules/ansible-modules-extras/windows/ there is a file named
__init__.py.
Similar to the issues you were experiencing i can run an ansible command
using the win_chocolatey module but when running a playbook I consistently
get the error "
win_chocolatey is not a legal parameter in an Ansible task or handler"
I am unsure of where to go from here. Any advice is appreciated.
Jason
On Friday, 23 January 2015 10:16:29 UTC+11, Rob White wrote:
>
> If you look in your module directory (my machine it
> is /usr/lib/python2.7/site-packages/ansible/modules/extras/windows/) do you
> see a __init__.py file?
>
> On Thursday, 22 January 2015 21:29:53 UTC+11, Jason C wrote:
>>
>> Hi Rob,
>>
>> What was your final solution? I am using the "devel" branch of
>> the ansible-modules-extras and are still experiencing the same issue as you
>> originally posted.
>>
>> On Thursday, 18 December 2014 13:42:13 UTC+11, Rob White wrote:
>>>
>>> Thanks!
>>>
>>> I saw the file was already added to the devel branch. I downloaded that
>>> branch and chocolatey module can now be called from playbook.
>>>
>>>
>>> On Wednesday, 17 December 2014 22:11:16 UTC+11, Netanel Maman wrote:
>>>>
>>>> solution:
>>>>
>>>> create this file: ansible/lib/ansible/modules/extras/windows/
>>>> __init__.py
>>>> make clean
>>>> make install
>>>>
>>>> --
>>>> behind the scenes:
>>>> setuptools don't copy win_chocolatey.py to install directory without
>>>> __init__.py
>>>> file.
>>>> ansible detect plugin by .py extension, so win_chocolatey not
>>>> detected..
>>>>
>>>> On Monday, December 8, 2014 7:47:30 AM UTC+2, Rob White wrote:
>>>>>
>>>>> I'm having trouble with win_chocolatey module in a playbook.
>>>>>
>>>>> I upgraded from 1.7 to 1.9 and then ran the following successfully:
>>>>>
>>>>> ansible windows -i inventories/windows -m win_chocolatey -c winrm -u
>>>>>> administrator -k -a 'package=notepadplusplus'
>>>>>> SSH password:
>>>>>> 1.2.3.4 | success >> {
>>>>>> "changed": true,
>>>>>> "chocolatey command":
>>>>>> "C:\\ProgramData\\chocolatey\\bin\\choco.exe install notepadplusplus
>>>>>> -source https://chocolatey.org/api/v2/",
>>>>>> "chocolatey_success": "true"
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>> So then I added to a playbook as per the documentation but I get the
>>>>> following error:
>>>>>
>>>>> ansible-playbook hosts_windows.yml -i inventories/windows
>>>>>> ERROR: win_chocolatey is not a legal parameter in an Ansible task or
>>>>>> handler
>>>>>
>>>>>
>>>>> Why would ansible see the module, but ansible-playbook fail?
>>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/247c5f22-e456-4e6a-afa1-a1b87a4a35bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.