Hi Jon

I made sure the UAC was disabled on all servers, also went through the 
event viewer on the servers and there are no errors at all.

I ran the playbook with -vvvv and got the out put below. From what I can 
see there is nothing to indicate why the script isnt running? Can you see 
anything?


TASK [Configure Octopus Deploy] 
************************************************
task path: /var/lib/awx/projects/Ansible Wintech 
Modules/windows/test_installocto.yml:5
<10.10.3.168> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 
5986 TO 10.10.3.168
<10.10.3.167> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 
5986 TO 10.10.3.167
<10.10.3.168> EXEC Set-StrictMode -Version Latest
(New-Item -Type Directory -Path $env:temp -Name 
"ansible-tmp-1455274488.54-175087382503447").FullName | Write-Host 
-Separator '';
<10.10.3.167> EXEC Set-StrictMode -Version Latest
(New-Item -Type Directory -Path $env:temp -Name 
"ansible-tmp-1455274488.55-16112873211253").FullName | Write-Host 
-Separator '';
<10.10.3.167> PUT "/var/lib/awx/projects/Ansible Wintech 
Modules/windows/files/octo_autoconfig.ps1" TO 
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1455274488.55-16112873211253\octo_autoconfig.ps1"
<10.10.3.168> PUT "/var/lib/awx/projects/Ansible Wintech 
Modules/windows/files/octo_autoconfig.ps1" TO 
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1455274488.54-175087382503447\octo_autoconfig.ps1"
<10.10.3.167> EXEC & 
 
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1455274488.55-16112873211253\octo_autoconfig.ps1"
<10.10.3.168> EXEC & 
 
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1455274488.54-175087382503447\octo_autoconfig.ps1"
<10.10.3.167> EXEC Set-StrictMode -Version Latest
Remove-Item 
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1455274488.55-16112873211253"
 
-Force -Recurse;
<10.10.3.168> EXEC Set-StrictMode -Version Latest
Remove-Item 
"C:\Users\Administrator\AppData\Local\Temp\ansible-tmp-1455274488.54-175087382503447"
 
-Force -Recurse;
changed: [10.10.3.167] => {"changed": true, "invocation": {"module_args": 
{"_raw_params": "files/octo_autoconfig.ps1"}, "module_name": "script"}, 
"rc": 0, "stderr": "", "stdout": "", "stdout_lines": []}
changed: [10.10.3.168] => {"changed": true, "invocation": {"module_args": 
{"_raw_params": "files/octo_autoconfig.ps1"}, "module_name": "script"}, 
"rc": 0, "stderr": "", "stdout": "", "stdout_lines": []}

PLAY RECAP 
*********************************************************************
10.10.3.167                : ok=2    changed=1    unreachable=0    failed=0
10.10.3.168                : ok=2    changed=1    unreachable=0    failed=0

[root@uk-ansible01 windows]# UAC


Cheers
Mark

On Thursday, February 11, 2016 at 5:11:31 PM UTC, Mark Matthews wrote:
>
> Hi
>
> I have a playbook that is running the below powershell script.
> If I run the script on the actual server it works perfectly. But when I 
> run the playbook nothing happens on the server.
> The job returns as changed....but nothing has happened.
>
> The playbook does seem to run quite quickly and I was wondering if Ansible 
> is stopping the Powershell job before it completes? Can Ansible do that, or 
> does it not have any effect on the script after it has been executed? If it 
> does have an efffect on stopping the job are you able to put a wait on the 
> job to allow the powershell script to complete?
>
> $InstallPath = "C:\Program Files\Octopus Deploy\Tentacle"
> $Server = $InstallPath + "\Tentacle.exe"
>
> # Start-Process "C:\Temp\Octopus.Tentacle.3.0.10.2278-x64.msi" /qn -Wait
>
> Start-Process $Server 'create-instance --instance "Tentacle" --config 
> "C:\Octopus\Tentacle.config"' -Wait
> Start-Process $Server 'new-certificate --instance "Tentacle" --if-blank' 
> -Wait
> Start-Process $Server 'configure --instance "Tentacle" --reset-trust' -Wait
> Start-Process $Server 'configure --instance "Tentacle" --home "C:\Octopus" 
> --app "C:\Octopus\Applications" --port "10933" --noListen "False"' -Wait
> Start-Process $Server 'configure --instance "Tentacle" --trust 
> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"' -Wait
> Start-Process $Server 'service --instance "Tentacle" --install --start' 
> -Wait
>
>
> Cheers
> Mark
>

-- 
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/e1277234-60b6-4dbb-a581-f133fc026eee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to