setting a variable in the root module, to attach to a host declared in a submodule
# This is not a resource that exists now, just an example of what could be added.
resource "ansible_host_var" "example" {
inventory_hostname = "db.example.com"
key = "db_password"
value = "testing1234"
}
Would require changes to the dynamic inventory script as well, because it would have to understand the resource type, and somehow merge the ansible_host.vars and ansible_host_var values.
Would solve problems with:
count=
may be requiredWould require changes to the dynamic inventory script as well, because it would have to understand the resource type, and somehow merge the
ansible_host.vars
andansible_host_var
values.