Overwrite with the environment variable TF_HOSTNAME_KEY_NAME which attribute is to be used for the ansible inventory name. By default, the IP address is used. The Ansible variable "ansible_host" is used to connect to the host.
When using a static inventory that declares new hosts alongside a
dynamic inventory provided by this utility, ansible will call the
dynamic inventory with `--host <host>` to merge in additional vars
that may have been provided by the dynamic inventory.
The default behaviour of *terraform-inventory* is to output an error
message when an unknown host is encountered, breaking this
functionality.
The correct behaviour is to return an empty hash implying there are
no additional vars for this host.
* Conform to Ansible inventory script conventions
* Make cmdInventory work with all group
* Add only uniq hosts to group "all"'s host list
* go fmt
* Fix typo
* Fix tests broken by #46
* Add duplicate host to test appendUniq
* Fix appendUniq and dedup other groups besides "all"
This change is really overkill for just defining the state path.
However, this opens the door for additional configuration options
such as choosing the keys to match on for the "host" argument.