#Flavour base build { name = "quid" description = <", "auto url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg", "" ] } provisioner "shell-local" { script = "${local.locations.provisionning}/quid/update-playbook.sh" env = { "REPO_DEST": "${local.locations.provisionning}/quid/quid-ansible", "REPO_URL": "ssh://git@forge.cadoles.com:2222/EFS/quid-ansible.git", "REPO_REF": "master" } } provisioner "shell" { script = "${local.locations.provisionning}/${var.name}/${var.name}-${var.short_version}-install.sh" } provisioner "shell" { script = "${local.locations.provisionning}/letsencrypt.sh" } // Store temporarily ansible vault password in local file provisioner "shell-local" { inline = ["echo '${var.quid_ansible_vault_passphrase}' > '${local.locations.provisionning}/quid/.ansible_vault_passphrase'"] } provisioner "ansible" { playbook_file = "${local.locations.provisionning}/quid/quid-ansible/deploy.yml" groups = ["quid_server"] // Manjaro/Arch OpenSSH version compatibility mode // See https://github.com/hashicorp/packer/issues/11783 extra_arguments = [ "--scp-extra-args", "'-O'", "-v", "--vault-password-file=${local.locations.provisionning}/quid/.ansible_vault_passphrase", "--extra-vars=@${local.locations.provisionning}/quid/ansible-vars.yml" ] } // Remove ansible vault password file provisioner "shell-local" { inline = ["rm -f '${local.locations.provisionning}/quid/.ansible_vault_passphrase'"] } post-processor "shell-local" { inline = [ "/bin/sh ${path.cwd}/post-processors/sparsify.sh ${var.output_dir}/${var.version}/base ${var.image_version}", ] } post-processor "manifest" { keep_input_artifact = true } }