packer: adjust ansible playbook filepath

We want an absolute path, otherwise packer doesn't know where to find the
playbook if called from a wrong directory.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2021-11-16 09:52:01 +01:00 committed by Tom Gundersen
parent b619e4875e
commit fbebe4c2cf

View file

@ -49,7 +49,7 @@ build {
sources = ["source.amazon-ebs.image_builder"] sources = ["source.amazon-ebs.image_builder"]
provisioner "ansible" { provisioner "ansible" {
playbook_file = "ansible/playbook.yml" playbook_file = "${path.root}/ansible/playbook.yml"
extra_arguments = [ extra_arguments = [
"-e", "COMPOSER_COMMIT=${var.composer_commit}", "-e", "COMPOSER_COMMIT=${var.composer_commit}",
"-e", "OSBUILD_COMMIT=${var.osbuild_commit}", "-e", "OSBUILD_COMMIT=${var.osbuild_commit}",