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 

--Tony Chia


On Friday, March 29, 2019 at 1:32:34 PM UTC-7, gigi...@gmail.com wrote:
>
> 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.
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b1d78fad-5c71-425a-8bec-5f059faf0310%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to