summaryrefslogtreecommitdiffstats
path: root/hcl2/flavor.pkr.hcl
blob: 974bf3231d09fbb4b7f8ab06cbb7d321ba24ec47 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# A build block invokes sources and runs provisioning steps on them.
# The documentation for build blocks can be found here:
# https://www.packer.io/docs/templates/hcl_templates/blocks/build

// packer {
//   required_plugins {
//     qemu = {
//       source  = "github.com/hashicorp/qemu"
//       version = "~> 1"
//     }
//     ansible = {
//       source  = "github.com/hashicorp/ansible"
//       version = "~> 1"
//     }
//   }
// }

build {
  name    = "flavor"
  sources = ["source.qemu.ansible"]

  provisioner "ansible" {
    extra_arguments = ["--ssh-extra-args", "-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa", "--scp-extra-args", "\"-O\""]
    playbook_file   = "${var.playbook_file}"
    sftp_command    = "/usr/libexec/openssh/sftp-server"
    use_sftp        = false
  }
}