Hi,
I’m creating an Ansible galaxy role to install and register an Octopus Deploy Tentacle on a Windows server.
The steps downloading and installing the Octopus Tentacle work fine.
The problem I’m having is configuring the installed Tentacle using Tentacle.exe
Here is the first line of the c:\Temp\RegisterTentacle.bat file:
"C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" create-instance --instance "Tentacle" --config "C:\Octopus\Tentacle.config"
And this is the Ansible playbook code calling the bat file:
- win_shell: RegisterTentacle.bat >> Log.txt
args:
executable: cmd
chdir: c:\Temp
When the playbook is run the following error is output in Log.txt
Cannot start service from the command line or a debugger.
A Windows Service must first be installed (using installutil.exe) and
then started with the ServerExplorer, Windows Services Administrative tool
or the NET START command.
The bat file runs fine from cmd.exe on the server itself, and I have tried using powershell instead of a bat file to no avail.
ps… this query is on Stack Overflow but I didn’t get any takers on there ->
https://stackoverflow.com/questions/46157796/calling-exe-with-win-shell-in-ansible-role