Open sjwl opened 5 years ago
Currently it seems extra_vars only supports map to string variables, but need more complex variable types than just string.
extra_vars
string
This example is attempting to use a list type, which fails.
list
extra_vars = { ansible_user = "ubuntu" nameservers = ["10.1.1.1"] }
This has more to do with the limitation of hcl, and perhaps hcl2 will help. Until then, could perhaps something like the chef provisioner with its attributes_json.
attributes_json
provisioner "chef" { attributes_json = <<-EOF { "key": "value", "app": { "cluster1": { "nodes": [ "webserver1", "webserver2" ] } } } EOF }
Currently it seems
extra_vars
only supports map to string variables, but need more complex variable types than juststring
.This example is attempting to use a
list
type, which fails.This has more to do with the limitation of hcl, and perhaps hcl2 will help. Until then, could perhaps something like the chef provisioner with its
attributes_json
.