You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/command/test-fixtures/build-variable-sharing/multiple_source_build.pkr.hcl

32 lines
673 B

source "null" "chocolate" {
communicator = "none"
}
source "null" "banana" {
communicator = "none"
}
build {
name = "vanilla"
sources = [
"null.chocolate",
"null.banana",
]
provisioner "shell-local" {
inline = [
"echo hi > all.${build.ID}.txt",
"echo hi > chocolate.${build.ID}.txt",
"echo hi > banana.${build.ID}.txt"
]
}
post-processor "shell-local" {
only = ["null.chocolate"]
inline = ["rm chocolate.${build.ID}.txt"]
}
post-processor "shell-local" {
except = ["null.chocolate"]
inline = ["rm banana.${build.ID}.txt"]
}
}