-
Notifications
You must be signed in to change notification settings - Fork 0
/
TentacleConfig.ps1
32 lines (29 loc) · 1.13 KB
/
TentacleConfig.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[CmdletBinding()]
param
(
[Parameter()] $OutputPath = [IO.Path]::Combine(
$PSScriptRoot, 'TentacleConfig'
),
[Parameter()] $ConfigData
)
Configuration Tentacle
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -Name OctopusDSC
Node $AllNodes.Where( {$_.Roles.Contains('Test')} ).NodeName
{
cTentacleAgent OctopusTentacle
{
Ensure = $Node.TentacleData.Ensure
State = $Node.TentacleData.State
Name = $Node.TentacleData.Name
APIKey = $Node.TentacleData.APIKey
OctopusServerUrl = $Node.TentacleData.OctopusServerUrl
Environments = $Node.TentacleData.Environments
Roles = $Node.TentacleData.Roles
ListenPort = $Node.TentacleData.ListenPort
DefaultApplicationDirectory = $Node.TentacleData.DefaultApplicationDirectory
}
}
}
Tentacle -OutputPath $OutputPath -ConfigData $ConfigData