PowerPhellスクリプトを実行してOctopus Deploy触手を構成するプレイブックがあります。Autoを使ってOctopus触手を構成する
このPowerShellスクリプトをサーバーで実行すると、完全に機能します。 PowerShellスクリプトでプレイブックを実行すると、サーバー上で失敗します。
これはおそらく何が原因でしょうか?パーミッション?タイムアウト?
Playbook:
---
- name: Configure Octopus Deploy Tentecle
hosts: all
tasks:
- name: Configure Octopus Deploy Tentecle
script: files/octo_autoconfig.ps1
PowerShellスクリプト:私はタコを設定への脚本を実行した後に開いたタコ触手をしようとすると、私が得る
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" create-instance --instance "Tentacle" --config "C:\Octopus\Tentacle.config" --console;
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" new-certificate --instance "Tentacle" --if-blank --console;
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" configure --instance "Tentacle" --reset-trust --console;
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" configure --instance "Tentacle" --home "C:\Octopus" --app "C:\Octopus\Applications" --port "10933" --noListen "False" --console;
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" configure --instance "Tentacle" --trust "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --console;
& "C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe" service --instance "Tentacle" --install --start --console;
エラー:
System.NullReferenceException: Object reference not set to an instance of an object.
at Octopus.Tools.TentacleConfiguration.TentacleManager.TentacleManagerModel.Reload(ApplicationInstanceRecord applicationInstance) in y:\work\refs\heads\master\source\Octopus.Tools\TentacleConfiguration\TentacleManager\TentacleManagerModel.cs:line 131
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
注私は直接PowerShellスクリプトを実行した場合ということサーバー上では完全に動作し、触手を構成します。私が触手を外してから、そのプレイブックを動かすと、それは機能します。そのため、あたかも触手を最初にサーバー上で構成してから、Ansibleプレイブックが機能するようにする必要があります。どのような種類のポイントを敗北させる。
私は、サーバーのイベントビューアーを見て、以下のようないくつかのアクセス拒否エラーがありました。
アクセス拒否エラーが発生しないように、特定の管理者にこのスクリプトを実行する方法はありますか?
2016-02-24 15:53:12.2675 1 FATAL System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Octopus.Shared.Internals.CertificateGeneration.Win32ErrorHelper.ThrowExceptionIfGetLastErrorIsNotZero() in y:\work\refs\heads\master\source\Octopus.Shared\Internals\CertificateGeneration\Win32ErrorHelper.cs:line 13
at Octopus.Shared.Internals.CertificateGeneration.CryptContext.Open() in y:\work\refs\heads\master\source\Octopus.Shared\Internals\CertificateGeneration\CryptContext.cs:line 38
at Octopus.Shared.Security.CertificateGenerator.Generate(String fullName, Boolean exportable) in y:\work\refs\heads\master\source\Octopus.Shared\Security\CertificateGenerator.cs:line 27
at Octopus.Shared.Configuration.TentacleConfiguration.GenerateNewCertificate() in y:\work\refs\heads\master\source\Octopus.Shared\Configuration\TentacleConfiguration.cs:line 188
at Octopus.Tentacle.Commands.NewCertificateCommand.Start() in y:\work\refs\heads\master\source\Octopus.Tentacle\Commands\NewCertificateCommand.cs:line 58
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\AbstractCommand.cs:line 58
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in y:\work\refs\heads\master\source\Octopus.Shared\Startup\ConsoleHost.cs:line 36