Ansible-Local and ansible_env_vars

17 views
Skip to first unread message

Eddie Dunn

unread,
Jun 25, 2021, 10:45:17 AMJun 25
to Packer
Hi,

I am trying to use ansible-local with packer 1.7.2 and pass in some env vars.
In the documentation it states that ansible_env_vars is an option for ansible-local.
https://www.packer.io/docs/provisioners/ansible/ansible-local

I cannot however get it to recognize the option and I get an error ("ansible_env_vars" is not expected here.)

Here is a snippet:
  provisioner "ansible-local" {
    playbook_file  = "..."
    playbook_dir   = ".."
    inventory_file = ".."
    group_vars     = ".."
    host_vars      = ".."
    ansible_env_vars = ["VAR=${var.var}",
                  "VAR1=${var.var1}"]
  }

Anyone have any idea why this is not working?

Thanks!

Megan Marsh

unread,
Jun 28, 2021, 5:33:25 PMJun 28
to packe...@googlegroups.com
Hmm, that doesn't seem right. Can you open a bug on the ansible plugin repo? https://github.com/hashicorp/packer-plugin-ansible

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/042a0f4d-4b76-4544-a5ea-4cb878ee990cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages