Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Packer
Commits
a125f81f
Commit
a125f81f
authored
5 years ago
by
Megan Marsh
Browse files
Options
Download
Email Patches
Plain Diff
add some more comments
parent
d47f151b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/step_provision.go
+6
-1
common/step_provision.go
with
6 additions
and
1 deletion
+6
-1
common/step_provision.go
+
6
-
1
View file @
a125f81f
...
...
@@ -23,12 +23,17 @@ import (
// <nothing>
func
PopulateProvisionHookData
(
state
multistep
.
StateBag
)
map
[
string
]
interface
{}
{
hookData
:=
map
[
string
]
interface
{}{}
// Load Builder hook data from state, if it has been set.
// hookData := state.GetOk("generated_data").(map[string]interface{})
// instance_id is placed in state by the builders.
// Not yet implemented in Chroot, lxc/lxd, Azure, Qemu.
// Implemented in most others including digitalOcean (droplet id),
// docker (container_id), and clouds which use "server" internally instead
// of instance.
// Also note that Chroot and lxc/lxd builders tend to have their own custom
// step_provision, so they won't use this code path.
id
,
ok
:=
state
.
GetOk
(
"instance_id"
)
if
ok
{
hookData
[
"ID"
]
=
id
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help