# Unable to install local package with win\_chocolatey

**URL:** <https://forum.ansible.com/t/unable-to-install-local-package-with-win-chocolatey/30027>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [March 29, 2019, 8:32pm UTC](https://forum.ansible.com/t/unable-to-install-local-package-with-win-chocolatey/30027 "2019-03-29T20:32:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gigit1000](https://avatars.discourse-cdn.com/v4/letter/g/a87d85/32.png) [@gigit1000](https://forum.ansible.com/u/gigit1000)\
**Post date:** [March 29, 2019, 8:32pm UTC](https://forum.ansible.com/t/unable-to-install-local-package-with-win-chocolatey/30027/1 "2019-03-29T20:32:34Z")

</div>

Hello,

I am able to manually install this package from the command line on the windows host like this:  
choco install C:\updater\GoogleChrome-AllUsers.26.0.1410.64.nupkg

But I’m not able to do it using the win\_chocolatey module from a playbook:  
win\_chocolatey:  
name: GoogleChrome-AllUsers  
source: C:\updater\GoogleChrome-AllUsers.26.0.1410.64.nupkg

I’ve tried a couple different versions of the above syntax, but the error is always the same:  
“Error checking installation status for the package GoogleChrome-AllUsers”

In the win\_chocolatey documentation is says you can use “a path to a folder” for source, but it does not seem to work. I guess I could just use the win\_command module instead, but I want to get some feedback before I abandon win\_chocolatey. Thanks much for any help.

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [March 30, 2019, 5:12pm UTC](https://forum.ansible.com/t/unable-to-install-local-package-with-win-chocolatey/30027/2 "2019-03-30T17:12:26Z")

</div>

I have not personally used the win\_chocolatey module but here are some of the things I would try

1. Enable verbose logging with -vvvvv when running with ansible-playbook
2. Try adding one or more of the following to the win\_chocolatey module like this

win\_chocolatey:  
name: GoogleChrome-AllUsers  
source: C:\updater\GoogleChrome-AllUsers.26.0.1410.64.nupkg

become: yes  
become\_user: Administrator  
become\_method: runas

I suspect when you run on the command line, you have adminstrator previlege. But the user ansible uses does not.

You can try to use the win\_command module to see if you can get it to work to rule out permission issue but I suspect you will run into similar issue.

For more information on Privilege Escalation, see  
[https://docs.ansible.com/ansible/latest/user\_guide/become.html](https://docs.ansible.com/ansible/latest/user_guide/become.html)

–Tony Chia

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [March 31, 2019, 7:36pm UTC](https://forum.ansible.com/t/unable-to-install-local-package-with-win-chocolatey/30027/3 "2019-03-31T19:36:17Z")

</div>

This is a known issue with the recent release of Chocolatey, [https://github.com/ansible/ansible/issues/53860#issuecomment-473431360](https://github.com/ansible/ansible/issues/53860#issuecomment-473431360).
