Balaji Chandrababu, 
Did you ever figure out a resolution to this issue? I'm having the same 
problem and not coming up with any solutions.
Thanks,
Sam



On Tuesday, February 2, 2016 at 10:57:14 AM UTC-5, Balaji Chandrababu wrote:
>
> Hi jhawkesworth,
>
> Yes I'm running from source.
>
> I have cloned the git repository with option set to --recursive and also i 
> have updated the submodules using  git submodule update --init 
> --recursive.
>
> Still it's not working.
>
> While checking the logs, i found that it was using /usr/bin/python in 
> place of C:/Python27/python. 
>
> Try
> {
> C:/Python27/python 
>  
> "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1454428251.01-120917033280940\ec2_ami_find.ps1"
> }
> Catch
>
> So i added this in aws_hosts file: 
>
> aws-win-host ansible_ssh_host=52.18.216.106 
> ansible_python_interpreter="C:/Python27/python"
>
> But now i get this error:
>
> An exception occurred during task execution. The full traceback is:
> Traceback (most recent call last):
>  File 
> "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1454428251.01-120917033280940\ec2_ami_find.ps1",
>  
> line 484, in <module>
>    import grp
> ImportError: No module named grp
>
> fatal: [aws-win-host]: FAILED! => {"changed": false, "failed": true, 
> "invocation": {"module_name": "ec2_ami_find"}, "parsed": false}
>
> Thanks,
> Balaji
>
> On Tuesday, 2 February 2016 14:36:08 UTC, jhawkesworth wrote:
>>
>> I have 2.0.0.2 working fine with local windows machines.
>>
>> Are you running from source?  If so perhaps you need to update your 
>> submodules 
>>
>> Hope this helps,
>>
>> Jon
>>
>> On Tuesday, 2 February 2016 14:11:57 UTC, Balaji Chandrababu wrote:
>>>
>>> Hi Chris,
>>>
>>> Can you tell me whether this issue is fixed in ansible version: 2.0.0.2 
>>> as I'm having an issue while running ansible playbook on aws windows 
>>> instances.
>>>
>>> My playbook looks like this:
>>>
>>> - name: ensure security group is present
>>>    ec2_group:
>>>      name: WinRM RDP
>>>      description: Inbound WinRM and RDP
>>>      region: "{{ target_aws_region }}"
>>>      rules:
>>>      - proto: tcp
>>>        from_port: 80
>>>        to_port: 80
>>>        cidr_ip: 0.0.0.0/0
>>>      - proto: tcp
>>>        from_port: 5986
>>>        to_port: 5986
>>>        cidr_ip: 0.0.0.0/0
>>>      - proto: tcp
>>>        from_port: 3389
>>>        to_port: 3389
>>>        cidr_ip: 0.0.0.0/0
>>>      rules_egress:
>>>      - proto: -1
>>>        cidr_ip: 0.0.0.0/0
>>>    register: sg_out
>>>
>>>  - ec2_ami_find:
>>>      region: "{{ target_aws_region }}"
>>>      platform: windows
>>>      virtualization_type: hvm
>>>      owner: amazon
>>>      name: Windows_Server-2012-R2_RTM-English-64Bit-Base-* 
>>>      no_result_action: fail
>>>      sort: name
>>>      sort_order: descending
>>>    register: found_amis
>>>
>>> None of these modules: ec2_group, ec2_ami_find work for me as it throws 
>>> this error:
>>>
>>> An exception occurred during task execution. The full traceback is:
>>> At line:4 char:1
>>> + /usr/bin/python 
>>> "C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-145442138 ...
>>> + ~~~~~~~~~~~~~~~
>>> fatal: [aws-win-host]: FAILED! => {"changed": false, "failed": true, 
>>> "invocation": {"module_name": "ec2_group"}, "msg": "The term 
>>> '/usr/bin/python' is not recognized as the name of a cmdlet, function, 
>>> script file, or operable program. Check the spelling of the name, or if a 
>>> path was included, verify that the path is correct and try again."}
>>>
>>> Please tell me if I'm doing something wrong.
>>>
>>>
>>> Thanks,
>>> Balaji
>>>
>>> On Thursday, 10 September 2015 21:15:44 UTC+1, Trond Hindenes wrote:
>>>>
>>>> The last working commit I can find which works on windows is ca 
>>>> e2e9319f06b058098cdf4272689766abb95b80f2 (
>>>> https://github.com/ansible/ansible/commit/e2e9319f06b058098cdf4272689766abb95b80f2)
>>>>  
>>>> note that I haven't tried all of them. From the logs it looks like ansible 
>>>> is trying to run python code on windows:
>>>>
>>>> elk.admigration.local | FAILED! => {
>>>>     "changed": false,
>>>>     "failed": true,
>>>>     "msg": "#< CLIXML\r\n<Objs Version=\"1.1.0.1\" xmlns=\"
>>>> http://schemas.microsoft.com/powershell/2004/04\";><Obj S=\"progress\" 
>>>> RefId=\"0\"><TN 
>>>> RefId=\"0\"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64
>>>>  
>>>> N=\"SourceId\">1</I64><PR N=\"Record\"><AV>Preparing modules for first 
>>>> use.</AV><AI>0</AI><Nil 
>>>> /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> 
>>>> </SD></PR></MS></Obj><Obj S=\"progress\" RefId=\"1\"><TNRef RefId=\"0\" 
>>>> /><MS><I64 N=\"SourceId\">1</I64><PR N=\"Record\"><AV>Preparing modules 
>>>> for 
>>>> first use.</AV><AI>0</AI><Nil 
>>>> /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> 
>>>> </SD></PR></MS></Obj><S S=\"Error\">/usr/bin/python : The term 
>>>> '/usr/bin/python' is not recognized as the name of _x000D__x000A_</S><S 
>>>> S=\"Error\">a cmdlet, function, script file, or operable program. Check 
>>>> the 
>>>> spelling of _x000D__x000A_</S><S S=\"Error\">the name, or if a path was 
>>>> included, verify that the path is correct and try _x000D__x000A_</S><S 
>>>> S=\"Error\">again._x000D__x000A_</S><S S=\"Error\">At line:1 
>>>> char:7_x000D__x000A_</S><S S=\"Error\">+ Try { /usr/bin/python 
>>>> \"C:\\Users\\ansible\\AppData\\Local\\Temp\\ansible-tm 
>>>> ..._x000D__x000A_</S><S S=\"Error\">+       
>>>> ~~~~~~~~~~~~~~~_x000D__x000A_</S><S S=\"Error\">    + CategoryInfo         
>>>>  : ObjectNotFound: (/usr/bin/python:String) [], Par _x000D__x000A_</S><S 
>>>> S=\"Error\">   entContainsErrorRecordException_x000D__x000A_</S><S 
>>>> S=\"Error\">    + FullyQualifiedErrorId : 
>>>> CommandNotFoundException_x000D__x000A_</S><S S=\"Error\"> 
>>>> _x000D__x000A_</S></Objs>",
>>>>     "parsed": false
>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to