Open jeka opened 5 years ago
@jeka I'm so sorry for the late reply. I finally had some time to look into this. I added a local_file
data source to the test fixtures, but that didn't recreate the problem you're seeing, so it must be something else.
Would it be possible to get a sanitized version of your entire terraform.tfstate
file?
@jeka Actually, I might have found the cause: It appears that you are not explicitly declaring any ansible_group
resources?
You have ansible_host
resources which declare groups and I suppose that we could generate groups based on this implicit group membership.
@jtopjian You are right, I am not declaring ansible_group resources. As this is a part of an 'instance' module and I am assigning groups on invocation, i. e.:
resource "ansible_host" "host" {
inventory_hostname = "${openstack_compute_instance_v2.this.*.name[count.index]}"
groups = "${var.ansible_groups}"
vars {
ansible_user = "${var.ssh_user}"
ansible_host = "${openstack_networking_floatingip_v2.fip.*.address[count.index]}"
}
}
@jeka Thanks for the info and for reporting this. I think this is now fixed and you can try it out in the latest release (https://github.com/jtopjian/ansible-terraform-inventory/releases/tag/v0.2.0). Let me know if you're still having problems, though.
Hello, at last, I have little time to play a bit more with this generator. First, sorry for the vague description, but I have no idea how to describe it better.
So, I have a case where nbering's python version of inventory generator works and this one fails. python version:
Go version:
I suspect that data source 'local_file' is confusing your generator. I added a line
and the resulting output is:
I can provide more information if needed.