ERROR: win_copy is not a legal parameter in an Ansible task or handler

585 views
Skip to first unread message

ken.k...@gmail.com

unread,
Apr 29, 2015, 3:48:32 PM4/29/15
to ansible...@googlegroups.com
ansible --version
ansible 2.0.0
  configured module search path = None


I receive this error when attempting to use wincopy.  
But I do see win_copy in modules

ls /usr/lib/python2.7/site-packages/ansible/modules/core/windows/
copy.ps1      setup.ps1     win_copy.pyo     win_feature.pyo  win_get_url.pyo  win_group.pyo  win_msi.pyo   win_ping.pyo     win_service.pyo  win_stat.pyo      win_user.ps1
__init__.py   slurp.ps1     win_feature.ps1  win_get_url.ps1  win_group.ps1    win_msi.ps1    win_ping.ps1  win_service.ps1  win_stat.ps1     win_template.py   win_user.py
__init__.pyc  win_copy.py   win_feature.py   win_get_url.py   win_group.py     win_msi.py     win_ping.py   win_service.py   win_stat.py      win_template.pyc  win_user.pyc
__init__.pyo  win_copy.pyc  win_feature.pyc  win_get_url.pyc  win_group.pyc    win_msi.pyc    win_ping.pyc  win_service.pyc  win_stat.pyc     win_template.pyo  win_user.pyo

Brian Coca

unread,
Apr 29, 2015, 5:51:30 PM4/29/15
to ansible...@googlegroups.com
its win_copy, not wincopy.


--
Brian Coca

ken.k...@gmail.com

unread,
Apr 30, 2015, 8:32:24 PM4/30/15
to ansible...@googlegroups.com
That was a typo I am using win_copy


Brian Coca

unread,
Apr 30, 2015, 9:01:49 PM4/30/15
to ansible...@googlegroups.com
soo, win_copy is not in ansible (yet) but you seem to have python
versions of the file (which is only for doc, actual file is .ps1)



--
Brian Coca

ken.k...@gmail.com

unread,
Apr 30, 2015, 9:30:49 PM4/30/15
to ansible...@googlegroups.com

Is it possible to get an early release. If not how do you copy files and templates to a windows machine?

Brian Coca

unread,
Apr 30, 2015, 9:36:09 PM4/30/15
to ansible...@googlegroups.com
win_copy and win_template ARE in the works, currently only the common
code is in the repo, we hope to have the plugins soon.




--
Brian Coca

Kenneth Krog

unread,
Apr 30, 2015, 9:50:01 PM4/30/15
to ansible...@googlegroups.com
OK moved them to my library path:

And got this
failed: [ntdvwqwebpcp02b] => {"failed": true, "parsed": false}
ConvertTo-Json : Could not load file or assembly 'System.Web.Extensions,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of
its dependencies. The paging file is too small for this operation to complete.
(Exception from HRESULT: 0x800705AF)
At C:\Users\testaccount\AppData\Local\Temp\ansible-tmp-1430444421.11-4114021981
1126\setup.ps1:85 char:17
+     echo $obj | ConvertTo-Json -Depth 99
+                 ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [ConvertTo-Json], FileLoadExce
   ption
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell
   .Commands.ConvertToJsonCommand

I also get this error if I disable the win_copy so MS Error.
Anyone else see this there is a hot fix

More to come.





--
Brian Coca

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/HTPsIAt8LrE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJ5XC8kv%3DZK1z7sDYOzBz2ashmuCNrGR2_vV0i5uuU6HM5VPjw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

ken.k...@gmail.com

unread,
Apr 30, 2015, 10:32:29 PM4/30/15
to ansible...@googlegroups.com
Another possible solution though I have failed to find a good one.
As a note if you are using 64 bit windows then the path might be windows.powershell32

J Hawkesworth

unread,
May 1, 2015, 3:41:51 AM5/1/15
to ansible...@googlegroups.com
Hi,

What version of Windows are you targeting?

Is it a fresh image?  Is it up to date with windows updates?

What version of Powershell is running on the windows host?

Can you run any Powershell directly on the windows machine (using the same user that you are connecting as)?

Jon

John Jelinek

unread,
May 1, 2015, 10:43:58 AM5/1/15
to ansible...@googlegroups.com
Is a win_copy (and win_file / win_template) plugin anticipated for the v2 launch?

J Hawkesworth

unread,
May 1, 2015, 1:24:38 PM5/1/15
to ansible...@googlegroups.com
Please see this thread on the development mailing list


Jon
Reply all
Reply to author
Forward
0 new messages