Changed my playbook to the following but it seems like it stalls and doesnt 
provide an final error

#Install Notepad 6.9.2 from specified repository
- hosts: all
  gather_facts: false
  tasks:
   - name: Install Notepad 6.9.2 Package
     win_package:
      path: 
\\IT00001352\Users\user\Documents\ANSIBLE\npp.6.9.2.Installer.exe
      product_id: "Notepad 6.9.2"
      user_name: "user"
      user_password: "pass"
      arguements: "/install /passive /norestart"

It seems to stick at the following output for a long time. I can see from 
the target box that powershell.exe is running as is the notepad installer 
itself. 

Is there something else I am missing in the above playbook?

Log output - 

10.10.128.0> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 
5986 TO                       10.10.128.0
<10.10.128.0> EXEC Set-StrictMode -Version Latest
(New-Item -Type Directory -Path $env:temp -Name 
"ansible-tmp-1471961958.88-29561                      933562114").FullName 
| Write-Host -Separator '';
<10.10.128.0> PUT "/tmp/tmpW4L0nP" TO 
"C:\Users\Administrator\AppData\Local\Temp                     
 \ansible-tmp-1471961958.88-29561933562114\win_package.ps1"
<10.10.128.0> EXEC Set-StrictMode -Version Latest
Try
{
& 
'C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1471961958.88-295619335 
                     62114\win_package.ps1'
}
Catch
{
$_obj = @{ failed = $true }
If ($_.Exception.GetType)
{
$_obj.Add('msg', $_.Exception.Message)
}
Else
{
$_obj.Add('msg', $_.ToString())
}
If ($_.InvocationInfo.PositionMessage)
{
$_obj.Add('exception', $_.InvocationInfo.PositionMessage)
}
ElseIf ($_.ScriptStackTrace)
{
$_obj.Add('exception', $_.ScriptStackTrace)
}
Try
{
$_obj.Add('error_record', ($_ | ConvertTo-Json | ConvertFrom-Json))
}
Catch
{
}
Echo $_obj | ConvertTo-Json -Compress -Depth 99
Exit 1
}
Finally { Remove-Item 
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-147                 
     1961958.88-29561933562114" -Force -Recurse -ErrorAction 
SilentlyContinue }

-- 
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/97c52412-39f8-48c3-94c7-af96cb0a0134%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to