working with windows

48 views
Skip to first unread message

Kez Halls

unread,
Dec 3, 2020, 2:04:18 AM12/3/20
to Ansible Project
Hi 
I am a windows person so no real unix experience.  I finally have ansible installed and have also successfully (I think) installed a plugin with the below
      ansible-galaxy collection install ansible.windows  

When trying to test this script
 - name: Install 7zip from a network share with specific credentials
      ansible.windows.win_get_url:
        path: \\{SERVER}\d$\Software\7-zip\7z1900-x64.exe
        product_id: 7-Zip
        arguments: /S
        state: present

I get
fatal: [{servername}]: FAILED! => {"changed": false, "msg": "Unhandled exception while executing module: The term 'Get-AnsibleWindowsWebRequestSpec' 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."}

I cannot find anything that states there are powershell re-reqs and do not even know how to find where this is trying to call it (on the linux server or on my windows server)
Any help appreciated.

Thanks

Stuart Lowe

unread,
Dec 3, 2020, 4:21:20 AM12/3/20
to ansible...@googlegroups.com

That’s a powershell function that is part of the ansible.windows module.

 

https://github.com/ansible-collections/ansible.windows/blob/main/plugins/module_utils/WebRequest.psm1

 

I’ve not used it myself, but it’s sounding like that module isn’t making it’s way to your windows server.

Hope that helps you with a place to start.

 

Stu

--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ae041c3f-6763-43b0-8ec9-979b183296c9n%40googlegroups.com.

--
Stuart Lowe
Cloud and Hosting Support Engineer
Zen Internet
Team: 01706 902009
Web: zen.co.uk

Proud to be a certified B Corporation

This message is private and confidential. If you have received this message in error, please notify us and remove it from your system.


Zen Internet Limited may monitor email traffic data to manage billing, to handle customer enquiries and for the prevention and detection of fraud. We may also monitor the content of emails sent to and/or from Zen Internet Limited for the purposes of security, staff training and to monitor quality of service.

Zen Internet Limited is registered in England and Wales, Sandbrook Park, Sandbrook Way, Rochdale, OL11 1RY Company No. 03101568 VAT Reg No. 686 0495 01

Kez Halls

unread,
Dec 3, 2020, 5:49:38 PM12/3/20
to Ansible Project
Are you suggesting that I should be copying down the modules to the server that I am running the command against?
If so why doesn't the examples show this to be the case?  ie: copy down modules or at least suggest this is a pre-requisite.

This would also mean that ansible wouldn't be an agentless solution as I would be installing extra components on my fleet of servers.

Very frustrated trying to understand how this is all meant to work

Thanks for your input.
Kez

Игорь Туровский

unread,
Dec 3, 2020, 6:39:47 PM12/3/20
to ansible...@googlegroups.com
Hi Kez, 

Win_get_url  module with these parameters looks a bit strange. May be it should be win_package?

чт, 3 дек. 2020 г., 10:04 Kez Halls <kezh...@bigpond.net.au>:

kezhalls kezhalls

unread,
Dec 3, 2020, 9:14:38 PM12/3/20
to ansible...@googlegroups.com

Thanks.  I did have win_package there and changed it based on some feedback.  forgot to change before I pasted in my post.
Its still the same issue I have with win_package.
To unsubscribe from this group and stop receiving emails from it, send an email to unsub...@googlegroups.com" target="_blank">ansible-project+unsub...@googlegroups.com.
 

 --
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/eujI9Q_8QYM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to unsub...@googlegroups.com">ansible-project+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAM1nFkEexQVZEKQyd8%3DWNU83-mWV65_o2-H1sDs94Ar-tPp2bg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages