Hi Bill, 
Try this:

  become: yes

  become_method: runas

  become_user: SYSTEM

On Wednesday, April 11, 2018 at 9:24:28 AM UTC-7, William Dossett wrote:
> Hi,
> Fairly new to Ansible, but  I am just finishing a fairly extensive course 
> on Linux Academy.  I have some good use cases... the first one is 
> configuring windows VMs to have a number of packages installed 
> automatically.  Currently I can uninstall old versions of java and install 
> the most current version of java on a number of VMs.
> I have a problem with the install thought that I can't seem to put my 
> finger on, but have reproduced several times now specifically on windows 
> 2016 servers and possibly on windows 2012.
> These VMs are automatically put on the domain when they are provisioned.  
> We are an engineering shop and we add all domain users to the local 
> administrator group as any engineer can logon to any VM as administrator.  
> These are engineering clusters only.
> I have configured Kerberos and it works fine in general, however when I 
> try to use win_package to install from a network share I have problems.
>  - name: Install Java from network share
>     win_package:
>      path: \\fileserver.mycorp.local\share\java\JavaSetup8u161.exe
>      product_id: '{26A24AE4-039D-4CA4-87B4-2F32180161F0}'
>      state: present
>      arguments: /s
>      user_name: MYCORP\myuser
>      user_password: secretpassword
> it fails with permissions
> "failed to connect network drive with credentials: Access is denied"
> I am a member of domain admins, and administrators... I can logon to these 
> systems and execute the package from PS console and it works fine, but not 
> using win_package
> If I change the user from myuser to administrator, then it works.  It 
> seems like this is to do with ansible as I can execute it from console as 
> me fine, but if anyone has any advice on what the problem might be, I would 
> sure appreciate it as this is kind of stumbling block to move on to a full 
> configuration that I am trying to achieve.
> Thanks
> Bill

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 
For more options, visit https://groups.google.com/d/optout.

Reply via email to