I have successfully installed visual studio using win_chocolatey in the 
past (with become escalating to run as local administrator).  Might be 
worth trying that.
I suspect running with become might fix your problem as clearly its upset 
about having access to C:\\Users\\ansible\\r4muzag1.gdd 

Hope this is some help,

Jon
On Thursday, January 25, 2018 at 10:25:47 AM UTC, Jeremie Levy wrote:
>
> Hi
>
> It seems i need to wait a bit after the Visual studio installation.
> It stated as failed because it couldn't remove the temporary install file 
> (web install file) - VS was installed !
>
> I'm using win_package and i'm not interested in using the raw module since 
> i need the win_package capabilities.
> A workaround would be to have: if you can't remove the file, it's not a 
> failure and keep going (which i don't know how to do yet :))
>
> task path: /ansible/scripts/vs2012.yaml:23                                
>                                                                             
>                                                                             
>                                                                         
> Using module file 
> /usr/lib/python2.7/dist-packages/ansible/modules/windows/win_package.ps1    
>                                                                             
>                                                                             
>                                                                       
> <hasjrwts02> ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5986 TO 
> hasjrwts02                 
> creating Kerberos CC at /tmp/tmpJ_QHmz                                    
>                                                                             
>                                                                             
>                                                                             
>               
> calling kinit for principal ansible                                        
>                                                                             
>                                                                             
>                                                                             
>          
> kinit succeeded for principal ansible                                      
>                                                                             
>                                                                             
>                                                                             
>          
> <hasjrwts02> WINRM CONNECT: transport=kerberos endpoint=
> https://hasjrwts02:5986/wsman                                            
>                                                                             
>                                                                          
> <hasjrwts02> WINRM OPEN SHELL: 23C2DB3A-DC34-4DA0-A019-7CD45579D735        
>                                                                             
>                                                                             
>                                                                       
> EXEC (via pipeline wrapper)                                                
>                                                                             
>                                                                             
>                                                                             
>              
> <hasjrwts02> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', 
> '-ExecutionPolicy', 'Unrestricted', '-']                                    
>                                                                             
>                                                                           
> <hasjrwts02> WINRM RESULT u'<Response code 1, out "", err "An error 
> occurred wh">'                                                              
>                                                                             
>                                                                             
>  
> <hasjrwts02> WINRM STDOUT                                                  
>                                                                             
>                                                                             
>                                                                       
> <hasjrwts02> WINRM STDERR An error occurred while creating the pipeline.  
>                                                                             
>                                                                             
>                                                                        
>     + CategoryInfo          : NotSpecified: (:) [], 
> ParentContainsErrorRecordException                                          
>                                                                             
>                                                                             
>                                     
>     + FullyQualifiedErrorId : RuntimeException                            
>                                                                             
>                                                                             
>                                                                             
>               
>                                                                           
>                                                                             
>                                                                             
>                                                                             
>               
> Exception calling "Run" with "1" argument(s): "Exception calling "Invoke" 
> with "0" argument(s): "The running command                                  
>                                                                             
>                                                                             
>               
> stopped because the preference variable "ErrorActionPreference" or common 
> parameter is set to Stop: Cannot remove item                                
>                                                                             
>                                                                             
>               
> C:\Users\ansible\r4muzag1.gdd: Access to the path 
> 'C:\Users\ansible\r4muzag1.gdd' is denied.""                                
>                                                                             
>                                                                             
>                               
> At line:47 char:5                                                          
>                                                                             
>                                                                             
>                                                                             
>              
> +     $output = $entrypoint.Run($payload)                                  
>                                                                             
>                                                                             
>                                                                             
>              
> +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                  
>                                                                             
>                                                                             
>                                                                             
>              
>     + CategoryInfo          : NotSpecified: (:) [], 
> ParentContainsErrorRecordException                                          
>                                                                             
>                                                                             
>                                     
>     + FullyQualifiedErrorId : ScriptMethodRuntimeException                
>                                                                             
>                                                                             
>                                                                             
>               
>                                                                           
>                                                                             
>                                                                             
>                                                                             
>               
>
> <hasjrwts02> WINRM CLOSE SHELL: 23C2DB3A-DC34-4DA0-A019-7CD45579D735
> fatal: [hasjrwts02]: FAILED! => {                                   
>     "changed": false,                                                      
>             
>     "module_stderr": "An error occurred while creating the pipeline.\r\n  
>   + CategoryInfo          : NotSpecified: (:) [], 
> ParentContainsErrorRecordException\r\n    + FullyQualifiedErrorId : 
> RuntimeException\r\n \r\nException calling \"Run\" with \"1\" argument(s): 
> \"Exception calling \"Invoke\" with \"0\" argument(s): \"The running 
> command \r\nstopped because the preference variable 
> \"ErrorActionPreference\" or common parameter is set to Stop: Cannot remove 
> item \r\nC:\\Users\\ansible\\r4muzag1.gdd: Access to the path 
> 'C:\\Users\\ansible\\r4muzag1.gdd' is denied.\"\"\r\nAt line:47 
> char:5\r\n+     $output = $entrypoint.Run($payload)\r\n+    
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : 
> NotSpecified: (:) [], ParentContainsErrorRecordException\r\n    + 
> FullyQualifiedErrorId : ScriptMethodRuntimeException\r\n \r\n",            
>                                                                             
>    
>     "module_stdout": "",                                                  
>                                                                             
>                                                                             
>                                                                             
>               
>     "msg": "MODULE FAILURE",                                              
>                                                                             
>                                                                             
>                                                                             
>               
>     "rc": 1                                                                
>                                                                           
>                                                                             
>                                                                             
>                
> }                                                                          
>                                                                             
>                                                                             
>                                                                             
>              
>         to retry, use: --limit @/ansible/scripts/vs2012.retry              
>      
>
>
> Any idea please :) ?
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b64c50f9-e825-4b1e-9ff7-2a097ac963f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to