Skip to content

Commit beb2de6

Browse files
committed
move Protect-Cell to last step
Seeing some intermittent failures which may be because Protect-Cell is turning off winrm when we need to use it for the last provisioning steps.
1 parent 83c7d3b commit beb2de6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/packer/config/templates/provision_windows2019.json.erb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,6 @@
129129
]
130130
},
131131
<% end %>
132-
{
133-
"type": "powershell",
134-
"inline": [
135-
"$ErrorActionPreference = \"Stop\";",
136-
"trap { $host.SetShouldExit(1) }",
137-
"Protect-CFCell -IaaS <%= iaas %>"
138-
]
139-
},
140132
{
141133
"type": "file",
142134
"source": "../sshd/OpenSSH-Win64.zip",
@@ -266,7 +258,7 @@
266258
"inline": [
267259
"$ErrorActionPreference = \"Stop\";",
268260
"trap { $host.SetShouldExit(1) }",
269-
"Invoke-Sysprep -IaaS <%= iaas %>"
261+
"Protect-CFCell -IaaS <%= iaas %>; Invoke-Sysprep -IaaS <%= iaas %>"
270262
]
271263
}
272264
]

0 commit comments

Comments
 (0)