Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

support complex variables #101

Open
sjwl opened this issue Nov 28, 2018 · 0 comments
Open

support complex variables #101

sjwl opened this issue Nov 28, 2018 · 0 comments

Comments

@sjwl
Copy link

sjwl commented Nov 28, 2018

Currently it seems extra_vars only supports map to string variables, but need more complex variable types than just string.

This example is attempting to use a list type, which fails.

            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.

  provisioner "chef" {
    attributes_json = <<-EOF
      {
        "key": "value",
        "app": {
          "cluster1": {
            "nodes": [
              "webserver1",
              "webserver2"
            ]
          }
        }
      }
    EOF
  }
sjwl pushed a commit to sjwl/terraform-provisioner-ansible that referenced this issue Nov 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant