mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-09 00:32:09 -04:00
25 lines
394 B
HCL
25 lines
394 B
HCL
source "null" "example" {
|
|
communicator = "none"
|
|
}
|
|
|
|
data "http" "basic" {
|
|
url = "https://www.packer.io/"
|
|
}
|
|
|
|
locals {
|
|
url = "${data.http.basic.url}"
|
|
body = "${data.http.basic.body}" != ""
|
|
}
|
|
|
|
build {
|
|
name = "mybuild"
|
|
sources = [
|
|
"source.null.example"
|
|
]
|
|
provisioner "shell-local" {
|
|
inline = [
|
|
"echo url is ${local.url}",
|
|
"echo body is ${local.body}"
|
|
]
|
|
}
|
|
}
|