vagrant-uplift 0.2.1902.32 → 0.2.1902.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco-packages.ps1 +40 -0
- data/lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco.ps1 +40 -0
- data/lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps-modules.ps1 +106 -0
- data/lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps1 +153 -0
- data/lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.resource.bootstrap.ps1 +16 -0
- data/lib/scripts/vagrant/uplift.vagrant.dc12/dc.dsc.ps1 +14 -14
- data/lib/scripts/vagrant/uplift.vagrant.dc12/dc.replica.dsc.ps1 +10 -10
- data/lib/vagrant-uplift/config_builder.rb +47 -0
- data/lib/vagrant-uplift/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0fa955ff16956c38662aacbabd394f8ee62b7566d64b9dc804f4b69d8bd68c1
|
4
|
+
data.tar.gz: 7771c3b4fe9ac762c9b970d170ce99576181036bbbfa6246d8dbbd167ce568b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3964129501c7684e4df8ec9fd362c294d47b9afe0932fd0e5039750ae8fb0a80e546036c8f2487ef3eff298a6f0680c10ffb7be7ff967dedc51cbb5df39382f
|
7
|
+
data.tar.gz: a6e85ea682cc717b0a85ffd882f9b1687e810f81a524288fbb1e918dbcb33291c0f8319ef7a8f7d0039d46a876b2d1f0912f77e1ff26f075eef96aa180ae9264
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# fail on errors and include uplift helpers
|
2
|
+
$ErrorActionPreference = "Stop"
|
3
|
+
|
4
|
+
Import-Module Uplift.Core
|
5
|
+
|
6
|
+
Write-UpliftMessage "Installing Chocolatey packages..."
|
7
|
+
Write-UpliftEnv
|
8
|
+
|
9
|
+
$packages = @(
|
10
|
+
# using for unpacking ISO and zip archives
|
11
|
+
@{ Id = "7zip"; Version = "" }
|
12
|
+
|
13
|
+
# dev basics!
|
14
|
+
@{ Id = "git"; Version = "" }
|
15
|
+
|
16
|
+
# using for better file download experience
|
17
|
+
# PowerShell can't handle huge files over seevral Gb
|
18
|
+
@{ Id = "wget"; Version = "" }
|
19
|
+
@{ Id = "curl"; Version = "" }
|
20
|
+
|
21
|
+
# modern PowerShell experience
|
22
|
+
@{ Id = "pwsh"; Version = "" }
|
23
|
+
)
|
24
|
+
|
25
|
+
Write-UpliftMessage "Installing packages: $packages"
|
26
|
+
|
27
|
+
foreach($package in $packages ) {
|
28
|
+
|
29
|
+
Write-UpliftMessage "`tinstalling package: $($package['Id']) $($package['Version'])"
|
30
|
+
|
31
|
+
if ([System.String]::IsNullOrEmpty($package["Version"]) -eq $true) {
|
32
|
+
choco install -y $package["Id"] --limit-output --acceptlicense --no-progress
|
33
|
+
} else {
|
34
|
+
choco install -y $package["Id"] --version $package["Version"] --limit-output --acceptlicense --no-progress
|
35
|
+
}
|
36
|
+
|
37
|
+
Confirm-UpliftExitCode $LASTEXITCODE "Cannot install package: $($package['Id']) $($package['Version'])"
|
38
|
+
}
|
39
|
+
|
40
|
+
exit 0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# fail on errors and include uplift helpers
|
2
|
+
$ErrorActionPreference = "Stop"
|
3
|
+
|
4
|
+
Import-Module Uplift.Core
|
5
|
+
|
6
|
+
Write-UpliftMessage "Installing 7z and PowerShell software..."
|
7
|
+
Write-UpliftEnv
|
8
|
+
|
9
|
+
function Set-UpliftChocolateyBootstrap() {
|
10
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingInvokeExpression", "", Scope="Function")]
|
11
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Scope="Function")]
|
12
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "", Scope="Function")]
|
13
|
+
|
14
|
+
param(
|
15
|
+
|
16
|
+
)
|
17
|
+
|
18
|
+
Write-UpliftMessage "Set-ExecutionPolicy Bypass -Force"
|
19
|
+
Set-ExecutionPolicy Bypass -Force;
|
20
|
+
|
21
|
+
Write-UpliftMessage "Installing chocolatey..."
|
22
|
+
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'));
|
23
|
+
Confirm-UpliftExitCode $LASTEXITCODE "Cannot install chocolatey"
|
24
|
+
|
25
|
+
Write-UpliftMessage "choco install -y 7zip..."
|
26
|
+
choco install -y 7zip --limit-output --acceptlicense --no-progress;
|
27
|
+
Confirm-UpliftExitCode $LASTEXITCODE "Cannot install 7zip"
|
28
|
+
|
29
|
+
if($psversiontable.PSVersion.Major -ne 5) {
|
30
|
+
Write-UpliftMessage "Major version of POwerShell below 5. Installing PowerShell, and a reboot is required"
|
31
|
+
choco install -y powershell --limit-output --acceptlicense --no-progress;
|
32
|
+
Confirm-UpliftExitCode $LASTEXITCODE "Cannot install powershell" @(0, 3010)
|
33
|
+
|
34
|
+
$LASTEXITCODE = 0;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
Set-UpliftChocolateyBootstrap
|
39
|
+
|
40
|
+
exit 0;
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# fail on errors and include uplift helpers
|
2
|
+
$ErrorActionPreference = "Stop"
|
3
|
+
|
4
|
+
Import-Module Uplift.Core
|
5
|
+
|
6
|
+
Write-UpliftMessage "Installing PowerShell Modules..."
|
7
|
+
Write-UpliftEnv
|
8
|
+
|
9
|
+
# - install other DSC packages
|
10
|
+
$packages = @(
|
11
|
+
|
12
|
+
@{
|
13
|
+
Id = "PSWindowsUpdate";
|
14
|
+
Version = "2.0.0.4"
|
15
|
+
},
|
16
|
+
|
17
|
+
@{
|
18
|
+
Id = "Pester";
|
19
|
+
Version = "4.3.1"
|
20
|
+
},
|
21
|
+
|
22
|
+
@{
|
23
|
+
Id = "cChoco";
|
24
|
+
Version = "2.3.1.0"
|
25
|
+
},
|
26
|
+
|
27
|
+
@{
|
28
|
+
Id = "cFirewall";
|
29
|
+
Version = "1.0.1"
|
30
|
+
},
|
31
|
+
|
32
|
+
@{
|
33
|
+
Id = "SharePointDSC";
|
34
|
+
Version = "1.9.0.0"
|
35
|
+
},
|
36
|
+
|
37
|
+
@{
|
38
|
+
Id = "MS_xVisualStudio";
|
39
|
+
Version = "1.0.0.0"
|
40
|
+
},
|
41
|
+
|
42
|
+
@{
|
43
|
+
Id = "xActiveDirectory";
|
44
|
+
Version = "2.17.0.0"
|
45
|
+
},
|
46
|
+
|
47
|
+
@{
|
48
|
+
Id = "xSQLServer";
|
49
|
+
Version = "9.1.0.0"
|
50
|
+
},
|
51
|
+
|
52
|
+
@{
|
53
|
+
Id = "xDSCFirewall";
|
54
|
+
Version = "1.6.21"
|
55
|
+
},
|
56
|
+
|
57
|
+
@{
|
58
|
+
Id = "xNetworking";
|
59
|
+
Version = "5.5.0.0"
|
60
|
+
},
|
61
|
+
|
62
|
+
@{
|
63
|
+
Id = "xTimeZone";
|
64
|
+
Version = "1.7.0.0"
|
65
|
+
},
|
66
|
+
|
67
|
+
@{
|
68
|
+
Id = "xWebAdministration";
|
69
|
+
Version = "1.19.0.0"
|
70
|
+
},
|
71
|
+
|
72
|
+
@{
|
73
|
+
Id = "xPendingReboot";
|
74
|
+
Version = "0.3.0.0"
|
75
|
+
},
|
76
|
+
|
77
|
+
@{
|
78
|
+
Id = "xComputerManagement";
|
79
|
+
Version = "4.0.0.0"
|
80
|
+
},
|
81
|
+
|
82
|
+
@{
|
83
|
+
Id = "DSCR_Shortcut";
|
84
|
+
Version = "1.3.7"
|
85
|
+
},
|
86
|
+
|
87
|
+
@{
|
88
|
+
Id = "ComputerManagementDsc";
|
89
|
+
Version = "6.1.0.0"
|
90
|
+
},
|
91
|
+
|
92
|
+
@{
|
93
|
+
Id = "xSystemSecurity";
|
94
|
+
Version = "1.4.0.0"
|
95
|
+
},
|
96
|
+
|
97
|
+
@{
|
98
|
+
Id = "xCredSSP";
|
99
|
+
Version = "1.3.0.0"
|
100
|
+
}
|
101
|
+
)
|
102
|
+
|
103
|
+
Write-UpliftMessage "Installing DSC modules: $packages"
|
104
|
+
Install-UpliftPSModules $packages
|
105
|
+
|
106
|
+
exit 0
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# fail on errors and include uplift helpers
|
2
|
+
$ErrorActionPreference = "Stop"
|
3
|
+
|
4
|
+
# core script to bootstrap uplift modiles
|
5
|
+
|
6
|
+
function Set-UpliftBootstrap() {
|
7
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Scope = "Function")]
|
8
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "", Scope = "Function")]
|
9
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "", Scope = "Function")]
|
10
|
+
|
11
|
+
param(
|
12
|
+
|
13
|
+
)
|
14
|
+
|
15
|
+
function Install-LatestPSModule() {
|
16
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Scope = "Function")]
|
17
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "", Scope = "Function")]
|
18
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "", Scope = "Function")]
|
19
|
+
|
20
|
+
param(
|
21
|
+
$moduleName,
|
22
|
+
$version,
|
23
|
+
$repository
|
24
|
+
)
|
25
|
+
|
26
|
+
if( [String]::IsNullOrEmpty($version) -eq $True) {
|
27
|
+
$version = $null
|
28
|
+
}
|
29
|
+
|
30
|
+
Write-Host "Installing module: $moduleName version: $version"
|
31
|
+
|
32
|
+
Write-Host "Looking for the latest module $moduleName"
|
33
|
+
$moduleDefinition = Find-Module -Name $moduleName `
|
34
|
+
| Select-Object Version, Repository `
|
35
|
+
| Sort-Object Version -Descending `
|
36
|
+
| Select-Object -First 1
|
37
|
+
|
38
|
+
Write-Host "Found module:"
|
39
|
+
Write-Host $moduleDefinition
|
40
|
+
Write-Host " - version : $($moduleDefinition.Version)"
|
41
|
+
Write-Host " - repository: $($moduleDefinition.Repository)"
|
42
|
+
|
43
|
+
if ($null -eq $version) {
|
44
|
+
|
45
|
+
if($null -eq $moduleDefinition) {
|
46
|
+
throw "Failed to install module $moduleName - repo/version were not provided, and cannot find latest in any repo!"
|
47
|
+
}
|
48
|
+
|
49
|
+
$version = $moduleDefinition.Version
|
50
|
+
|
51
|
+
if($null -eq $repository) {
|
52
|
+
$repository = $moduleDefinition.Repository
|
53
|
+
}
|
54
|
+
|
55
|
+
Write-Host "Installing latest ($version) from repo: $repository"
|
56
|
+
Install-Package $moduleName -Source $repository -RequiredVersion $version -Force
|
57
|
+
}
|
58
|
+
else {
|
59
|
+
if($null -eq $repository) {
|
60
|
+
$repository = $moduleDefinition.Repository
|
61
|
+
}
|
62
|
+
|
63
|
+
Write-Host "Installing specified version $version from repo: $repository"
|
64
|
+
Install-Package $moduleName -Source $repository -Force -RequiredVersion $version
|
65
|
+
}
|
66
|
+
|
67
|
+
Write-Host "Checking installed module: $moduleName"
|
68
|
+
$installeModule = Get-InstalledModule $moduleName
|
69
|
+
|
70
|
+
if ($null -eq $installeModule) {
|
71
|
+
throw "Cannot find installed module: $moduleName"
|
72
|
+
}
|
73
|
+
else {
|
74
|
+
Write-Host "All good! Installed module:"
|
75
|
+
|
76
|
+
Write-Host " - name : $($installeModule.Name)"
|
77
|
+
Write-Host " - version: $($installeModule.Version)"
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
function New-UpliftPSRepositoryRegistration {
|
82
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSShouldProcess", "", Scope = "Function")]
|
83
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "", Scope = "Function")]
|
84
|
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "", Scope = "Function")]
|
85
|
+
|
86
|
+
param(
|
87
|
+
$name,
|
88
|
+
$source,
|
89
|
+
$providerublish = $null,
|
90
|
+
$installPolicy = "Trusted"
|
91
|
+
)
|
92
|
+
|
93
|
+
$repo = Get-PSRepository `
|
94
|
+
-Name $name `
|
95
|
+
-ErrorAction SilentlyContinue
|
96
|
+
|
97
|
+
if ($null -eq $repo) {
|
98
|
+
Write-Host " [~] Regestering repo: $name"
|
99
|
+
Write-Host " - path: $source"
|
100
|
+
Write-Host " - installPolicy: $installPolicy"
|
101
|
+
|
102
|
+
if ($null -eq $providerublish) {
|
103
|
+
Write-Host " - publish location: $source"
|
104
|
+
|
105
|
+
Register-PSRepository -Name $name `
|
106
|
+
-SourceLocation $source `
|
107
|
+
-PublishLocation $source `
|
108
|
+
-InstallationPolicy $installPolicy
|
109
|
+
}
|
110
|
+
else {
|
111
|
+
Write-Host " - publish location: $source"
|
112
|
+
|
113
|
+
Register-PSRepository -Name $name `
|
114
|
+
-SourceLocation $source `
|
115
|
+
-PublishLocation $providerublish `
|
116
|
+
-InstallationPolicy $installPolicy
|
117
|
+
}
|
118
|
+
|
119
|
+
}
|
120
|
+
else {
|
121
|
+
Write-Host "Repo exists: $name"
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
Write-Host "Bootstrapping uplift modules..."
|
126
|
+
$provider = Get-PackageProvider -ListAvailable
|
127
|
+
|
128
|
+
Write-Host "Available providers: $provider"
|
129
|
+
|
130
|
+
if ($null -eq ($provider | Where-Object { $_.Name.Contains("NuGet") -eq $true } ) ) {
|
131
|
+
Write-Host "Installing Nuget Package provider..."
|
132
|
+
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
|
133
|
+
|
134
|
+
Write-Host "Updating PSGallery as Trusted"
|
135
|
+
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
|
136
|
+
}
|
137
|
+
else {
|
138
|
+
Write-Host "No update required."
|
139
|
+
}
|
140
|
+
|
141
|
+
Write-Host "Adding PSGallery: subpointsolutions-staging"
|
142
|
+
New-UpliftPSRepositoryRegistration 'subpointsolutions-staging' `
|
143
|
+
'https://www.myget.org/F/subpointsolutions-staging/api/v2'
|
144
|
+
|
145
|
+
Install-LatestPSModule `
|
146
|
+
"Uplift.Core" `
|
147
|
+
($env:UPLF_UPLIFT_CORE_MODULE_VERSION) `
|
148
|
+
($env:UPLF_UPLIFT_CORE_MODULE_REPOSITORY)
|
149
|
+
}
|
150
|
+
|
151
|
+
Set-UpliftBootstrap
|
152
|
+
|
153
|
+
exit 0
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# fail on errors and include uplift helpers
|
2
|
+
$ErrorActionPreference = "Stop"
|
3
|
+
|
4
|
+
Import-Module Uplift.Core
|
5
|
+
|
6
|
+
Write-UpliftMessage "Installing PowerShell Modules..."
|
7
|
+
Write-UpliftEnv
|
8
|
+
|
9
|
+
# - install invoke uplift module under pwsh
|
10
|
+
# we need this so that pwsh would see installed module
|
11
|
+
Write-UpliftMessage "Installing Invoke-Uplift PS6 module"
|
12
|
+
|
13
|
+
Install-UpliftPS6Module `
|
14
|
+
"InvokeUplift" `
|
15
|
+
(Get-UpliftEnvVariable "UPLF_INVOKE_UPLIFT_MODULE_VERSION" "" "") `
|
16
|
+
(Get-UpliftEnvVariable "UPLF_INVOKE_UPLIFT_MODULE_REPOSITORY" "" "")
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# fail on errors and include uplift helpers
|
1
|
+
# fail on errors and include uplift helpers
|
2
2
|
$ErrorActionPreference = "Stop"
|
3
3
|
|
4
4
|
Import-Module Uplift.Core
|
@@ -23,9 +23,9 @@ Set-UpliftDCPromoSettings $domainAdminPassword
|
|
23
23
|
Configuration Install_DomainController {
|
24
24
|
|
25
25
|
Import-DscResource -ModuleName 'PSDesiredStateConfiguration'
|
26
|
-
Import-DscResource -ModuleName 'xActiveDirectory' -ModuleVersion "2.17.0.0"
|
27
|
-
Import-DscResource -ModuleName 'xNetworking' -ModuleVersion "5.5.0.0"
|
28
|
-
|
26
|
+
Import-DscResource -ModuleName 'xActiveDirectory' -ModuleVersion "2.17.0.0"
|
27
|
+
Import-DscResource -ModuleName 'xNetworking' -ModuleVersion "5.5.0.0"
|
28
|
+
|
29
29
|
Node localhost
|
30
30
|
{
|
31
31
|
$domainName = $Node.DomainName
|
@@ -34,7 +34,7 @@ Configuration Install_DomainController {
|
|
34
34
|
|
35
35
|
$securePassword = ConvertTo-SecureString $domainAdminPassword -AsPlainText -Force
|
36
36
|
$domainAdminCreds = New-Object System.Management.Automation.PSCredential(
|
37
|
-
$domainAdminName,
|
37
|
+
$domainAdminName,
|
38
38
|
$securePassword
|
39
39
|
)
|
40
40
|
|
@@ -86,18 +86,18 @@ Configuration Install_DomainController {
|
|
86
86
|
# Windows 2016 fix
|
87
87
|
# http://vcloud-lab.com/entries/active-directory/powershell-dsc-xactivedirectory-error-a-netbios-domain-name-must-be-specified-
|
88
88
|
DomainNetBIOSName = $domainName.Split('.')[0]
|
89
|
-
|
89
|
+
|
90
90
|
DomainAdministratorCredential = $domainAdminCreds
|
91
91
|
SafemodeAdministratorPassword = $safeModeAdminCreds
|
92
|
-
|
92
|
+
|
93
93
|
DatabasePath = "C:\NTDS"
|
94
94
|
LogPath = "C:\NTDS"
|
95
95
|
SysvolPath = "C:\SYSVOL"
|
96
|
-
|
96
|
+
|
97
97
|
DependsOn = @(
|
98
|
-
"[WindowsFeature]ADDSInstall",
|
99
|
-
"[WindowsFeature]RSAT",
|
100
|
-
"[WindowsFeature]ADDSRSAT",
|
98
|
+
"[WindowsFeature]ADDSInstall",
|
99
|
+
"[WindowsFeature]RSAT",
|
100
|
+
"[WindowsFeature]ADDSRSAT",
|
101
101
|
"[xDnsServerAddress]DnsServerAddress"
|
102
102
|
)
|
103
103
|
}
|
@@ -111,8 +111,8 @@ $config = @{
|
|
111
111
|
|
112
112
|
PSDscAllowDomainUser = $true
|
113
113
|
PSDscAllowPlainTextPassword = $true
|
114
|
-
|
115
|
-
RetryCount = 10
|
114
|
+
|
115
|
+
RetryCount = 10
|
116
116
|
RetryIntervalSec = 30
|
117
117
|
|
118
118
|
DomainName = $domainName
|
@@ -123,6 +123,6 @@ $config = @{
|
|
123
123
|
}
|
124
124
|
|
125
125
|
$configuration = Get-Command Install_DomainController
|
126
|
-
Start-UpliftDSCConfiguration $configuration $config
|
126
|
+
Start-UpliftDSCConfiguration $configuration $config
|
127
127
|
|
128
128
|
exit 0
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# fail on errors and include uplift helpers
|
1
|
+
# fail on errors and include uplift helpers
|
2
2
|
$ErrorActionPreference = "Stop"
|
3
3
|
|
4
4
|
Import-Module Uplift.Core
|
@@ -21,7 +21,7 @@ Configuration Install_ReplicaDomainController {
|
|
21
21
|
|
22
22
|
Import-DscResource -ModuleName xActiveDirectory -ModuleVersion 2.17.0.0
|
23
23
|
Import-DscResource -ModuleName xNetworking -ModuleVersion 5.5.0.0
|
24
|
-
|
24
|
+
|
25
25
|
Node localhost
|
26
26
|
{
|
27
27
|
$domainName = $Node.DomainName
|
@@ -29,7 +29,7 @@ Configuration Install_ReplicaDomainController {
|
|
29
29
|
$domainAdminPassword = $Node.DomainAdminPassword
|
30
30
|
|
31
31
|
$securePassword = ConvertTo-SecureString $domainAdminPassword -AsPlainText -Force
|
32
|
-
|
32
|
+
|
33
33
|
$domainAdminCreds = New-Object System.Management.Automation.PSCredential($domainAdminName, $securePassword)
|
34
34
|
$safeModeAdminCreds = $domainAdminCreds
|
35
35
|
$dnsDelegationCreds = $domainAdminCreds
|
@@ -79,13 +79,13 @@ Configuration Install_ReplicaDomainController {
|
|
79
79
|
# win16 fix
|
80
80
|
# http://vcloud-lab.com/entries/active-directory/powershell-dsc-xactivedirectory-error-a-netbios-domain-name-must-be-specified-
|
81
81
|
# DomainNetBIOSName = $domainName.Split('.')[0]
|
82
|
-
|
82
|
+
|
83
83
|
DomainAdministratorCredential = $domainAdminCreds
|
84
84
|
SafemodeAdministratorPassword = $safeModeAdminCreds
|
85
|
-
|
85
|
+
|
86
86
|
DependsOn = @(
|
87
|
-
"[WindowsFeature]ADDSInstall"
|
88
|
-
# "[WindowsFeature]RSAT",
|
87
|
+
"[WindowsFeature]ADDSInstall"
|
88
|
+
# "[WindowsFeature]RSAT",
|
89
89
|
# "[WindowsFeature]ADDSRSAT",
|
90
90
|
#"[xDnsServerAddress]DnsServerAddress"
|
91
91
|
)
|
@@ -100,8 +100,8 @@ $config = @{
|
|
100
100
|
|
101
101
|
PSDscAllowDomainUser = $true
|
102
102
|
PSDscAllowPlainTextPassword = $true
|
103
|
-
|
104
|
-
RetryCount = 10
|
103
|
+
|
104
|
+
RetryCount = 10
|
105
105
|
RetryIntervalSec = 30
|
106
106
|
|
107
107
|
DomainName = $domainName
|
@@ -112,6 +112,6 @@ $config = @{
|
|
112
112
|
}
|
113
113
|
|
114
114
|
$configuration = Get-Command Install_ReplicaDomainController
|
115
|
-
Start-UpliftDSCConfiguration $configuration $config
|
115
|
+
Start-UpliftDSCConfiguration $configuration $config
|
116
116
|
|
117
117
|
exit 0
|
@@ -476,6 +476,12 @@ module VagrantPlugins
|
|
476
476
|
|
477
477
|
vm_config.winrm.username = "vagrant"
|
478
478
|
vm_config.winrm.password = "vagrant"
|
479
|
+
|
480
|
+
# HTTPClient::KeepAliveDisconnected: An existing connection was forcibly closed by the remote host #6430
|
481
|
+
# https://github.com/hashicorp/vagrant/issues/6430
|
482
|
+
# https://github.com/hashicorp/vagrant/issues/8323
|
483
|
+
vm_config.winrm.retry_limit = 30
|
484
|
+
vm_config.winrm.retry_delay = 10
|
479
485
|
end
|
480
486
|
|
481
487
|
# Disables default synced_folder for vagrant box
|
@@ -1135,6 +1141,47 @@ module VagrantPlugins
|
|
1135
1141
|
})
|
1136
1142
|
end
|
1137
1143
|
|
1144
|
+
# Provisions box with the minimal oconfiguration to enable uplift
|
1145
|
+
# That allows uplift usage on custom vagrant boxes
|
1146
|
+
# - installs uplift.core ps module
|
1147
|
+
# - installs various dsc modules
|
1148
|
+
#
|
1149
|
+
# @param vm_name [String] vagrant vm name
|
1150
|
+
# @param vm_config [Vagrant::Config::V2::Root] vagrant vm config
|
1151
|
+
def provision_uplift_bootstrap(vm_name, vm_config)
|
1152
|
+
|
1153
|
+
require_string(vm_name)
|
1154
|
+
require_vagrant_config(vm_config)
|
1155
|
+
|
1156
|
+
log_info_light("#{vm_name}: Uplift bootstrap")
|
1157
|
+
|
1158
|
+
vm_config.vm.provision "shell",
|
1159
|
+
name: 'uplift.bootstrap',
|
1160
|
+
path: "#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps1"
|
1161
|
+
|
1162
|
+
vm_config.vm.provision "shell",
|
1163
|
+
name: 'uplift.choco',
|
1164
|
+
path: "#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco.ps1"
|
1165
|
+
|
1166
|
+
vm_config.vm.provision "shell",
|
1167
|
+
name: 'uplift.choco-packages',
|
1168
|
+
path: "#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco-packages.ps1"
|
1169
|
+
|
1170
|
+
vm_config.vm.provision "shell",
|
1171
|
+
name: 'uplift.dsc.bootstrap',
|
1172
|
+
path: "#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps-modules.ps1"
|
1173
|
+
|
1174
|
+
vm_config.vm.provision "shell",
|
1175
|
+
name: 'uplift.resource-modul',
|
1176
|
+
path: "#{vagrant_script_path}/vagrant/uplift.vagrant.bootstrap/uplift.resource.bootstrap.ps1"
|
1177
|
+
|
1178
|
+
|
1179
|
+
_track_ai_event(__method__, {
|
1180
|
+
'vm_name': vm_name
|
1181
|
+
})
|
1182
|
+
|
1183
|
+
end
|
1184
|
+
|
1138
1185
|
private
|
1139
1186
|
|
1140
1187
|
def _logger
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-uplift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.1902.
|
4
|
+
version: 0.2.1902.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SubPointSupport
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -62,6 +62,11 @@ extra_rdoc_files: []
|
|
62
62
|
files:
|
63
63
|
- bin/console
|
64
64
|
- bin/setup
|
65
|
+
- lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco-packages.ps1
|
66
|
+
- lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.choco.ps1
|
67
|
+
- lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps-modules.ps1
|
68
|
+
- lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.bootstrap.ps1
|
69
|
+
- lib/scripts/vagrant/uplift.vagrant.bootstrap/uplift.resource.bootstrap.ps1
|
65
70
|
- lib/scripts/vagrant/uplift.vagrant.core/uplift.fix-second-network.ps1
|
66
71
|
- lib/scripts/vagrant/uplift.vagrant.dc12/dc.dsc.ps1
|
67
72
|
- lib/scripts/vagrant/uplift.vagrant.dc12/dc.replica.dsc.ps1
|