[ansible-project] Re: [Windows] Install visual studio

2018-02-12 Thread Aaron K
+1 for Chocolatey.  Way easier to manage updates and install software and 
it pulls straight from the vendor if you use an internet package versus 
your own chocolatey repository.

On Thursday, January 25, 2018 at 4:03:50 PM UTC-5, J Hawkesworth wrote:
>
> 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
>> 
>> 
>>   
>>  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
>> 
>> 
>> 
>>
>>  WINRM CONNECT: transport=kerberos endpoint=
>> https://hasjrwts02:5986/wsman
>> 
>>  
>>  WINRM OPEN SHELL: 23C2DB3A-DC34-4DA0-A019-7CD45579D735  
>> 
>> 
>> 
>> EXEC (via pipeline wrapper)  
>> 
>> 
>> 
>>
>>  WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', 
>> '-ExecutionPolicy', 'Unrestricted', '-']
>> 
>>   
>>  WINRM RESULT u'> occurred wh">'  
>> 
>> 
>>  
>>  WINRM STDOUT
>> 
>> 
>> 
>>  WINRM STDERR An error occurred while creating the pipeline.  
>> 
>> 
>>
>> + CategoryInfo

Re: [ansible-project] Re: [Windows] Install visual studio

2018-01-28 Thread Jeremie Levy
To avoid this issue and since my user is already admin on the server, i've 
just download the file first instead of installing over http url.
Thanks!

On Sunday, January 28, 2018 at 6:59:33 PM UTC+2, Varun Chopra wrote:
>
> Yes, and?

-- 
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/886349bd-5014-4e32-b271-b474c27a3ebd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: [Windows] Install visual studio

2018-01-28 Thread Varun Chopra
Yes, and?

-- 
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/ab52b6af-c159-49f8-9507-72f0654eab0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: [Windows] Install visual studio

2018-01-28 Thread Varun Chopra
That's not how become works. You can set become: yes at the task and play 
level, not module level.

-- 
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/77463337-021c-4596-8e26-0196f2069654%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: [Windows] Install visual studio

2018-01-28 Thread Jeremie Levy
Seems there is no become in the win_package module...

On Thu, Jan 25, 2018 at 11:03 PM, 'J Hawkesworth' via Ansible Project <
ansible-project@googlegroups.com> wrote:

> 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-packag
>> es/ansible/modules/windows/win_package.ps1
>>
>>
>>
>>  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
>>
>>
>>
>>
>>  WINRM CONNECT: transport=kerberos endpoint=
>> https://hasjrwts02:5986/wsman
>>
>>
>>  WINRM OPEN SHELL: 23C2DB3A-DC34-4DA0-A019-7CD45579D735
>>
>>
>>
>> EXEC (via pipeline wrapper)
>>
>>
>>
>>
>>  WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive',
>> '-ExecutionPolicy', 'Unrestricted', '-']
>>
>>
>>  WINRM RESULT u'> occurred wh">'
>>
>>
>>
>>  WINRM STDOUT
>>
>>
>>
>>  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
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>  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 a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ansible-project/7kWJpzbcnDo/unsubscribe.
> To unsubscribe from this group and all its topics, 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/b64c50f9-e825-4b1e-9ff7-2a097ac963f6%40googlegroups.
> com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving e

[ansible-project] Re: [Windows] Install visual studio

2018-01-25 Thread 'J Hawkesworth' via Ansible Project
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
> 
> 
>   
>  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  
> 
> 
> 
>  
>  WINRM CONNECT: transport=kerberos endpoint=
> https://hasjrwts02:5986/wsman
> 
>  
>  WINRM OPEN SHELL: 23C2DB3A-DC34-4DA0-A019-7CD45579D735
> 
> 
>   
> EXEC (via pipeline wrapper)
> 
> 
> 
>  
>  WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', 
> '-ExecutionPolicy', 'Unrestricted', '-']
> 
>   
>  WINRM RESULT u' occurred wh">'  
> 
> 
>  
>  WINRM STDOUT  
> 
> 
>   
>  WINRM STDERR An error occurred while creating the pipeline.  
> 
> 
>
> + CategoryInfo  : NotSpecified: (:) [], 
> ParentContainsErrorRecordException  
> 
> 
> 
> + FullyQualifiedErrorId : Runtime