1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-11-26 11:53:48 +01:00
Commit Graph

24 Commits

Author SHA1 Message Date
Andreas Sommer
8b4b0ccdc0
Fix parsing index field in case of non-numeric string (as allowed in for_each construct), fix sorting (#153)
* Fix parsing `index` field in case of non-numeric string (as allowed in `for_each` construct), fix sorting
* Use newer Go versions in CI so functions like `errors.Unwrap` are available
2021-07-30 17:06:38 -04:00
Olivier Bilodeau
a408e89660 Don't use dots in Ansible groups (#128)
Starting with Ansible 2.8 dots (.) are no longer allowed in groups: https://docs.ansible.com/ansible/latest/reference_appendices/config.html#transform-invalid-group-chars.
2019-10-01 15:20:06 -04:00
Andreas Sommer
94a66e3c5e Support Terraform 0.12 state format (#114) 2019-08-01 11:21:54 -04:00
Atadilo
aecdc48546 Add tags support to VSphere provider (#88) 2018-09-20 10:37:44 -04:00
Christian Groschupp
2365c9b801 Add TF_HOSTNAME_KEY_NAME to specify which hostname to return (#94)
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.
2018-09-20 10:22:53 -04:00
Sami Hiltunen
2222e6477f Order output for resources with count (#77) 2017-10-20 11:32:34 -04:00
Seua Polyakov
c23c86aa4b Fix non-string vars in --inventory output (#72)
* Fix --inventory output
* Sort --inventory output
2017-09-19 10:54:24 -04:00
Jan Jungnickel
9235bf4079 Return an empty hash for unknown hosts (#73)
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.
2017-09-04 11:56:13 -04:00
Sameer Chauhan
be8d8d7bdb Initializes all_group to be an empty array (#49)
* Initialize all_group with empty slice
2017-01-18 21:24:46 -05:00
Jonathan McCall
0e941ce0d5 Create all group as per Ansible inventory script conventions (#46)
* 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"
2016-09-22 00:13:26 -04:00
Isao Jonas
e62801bb58 allow for non-string outputs (#45) 2016-09-06 23:05:30 -04:00
Lazar Travica
df49397b0c Go fmt. 2016-04-09 17:27:00 +02:00
Lazar Travica
44c888e6c8 Made compatible with pull request #31 2016-04-09 17:22:39 +02:00
Lazar Travica
bec63f57e1 Merge remote-tracking branch 'upstream/master' 2016-04-09 17:07:01 +02:00
André Santos
10faafd763 Added the inventory option to produce an output similar to ansible host file 2016-02-24 12:24:34 +00:00
Lazar Travica
99ff88b3ce Not outputting the global variables if no outputs are set. 2016-02-18 11:46:40 +01:00
Lazar Travica
6ead28eee6 Showing Terraform outputs as "global" variables in the Ansible dynamic inventory json. 2016-02-16 12:12:49 +01:00
Adam Mckaig
3e00bfbe37 Split high/low level resource stuff 2015-12-14 22:24:41 -05:00
Adam Mckaig
aa1c5d4b19 Match host command by Address, not Name 2015-12-09 23:34:25 -05:00
Adam Mckaig
7276f41f50 Add integration test for host command 2015-12-09 23:34:17 -05:00
Adam Mckaig
a212fb68b7 List resources with and without counters 2015-12-09 22:54:19 -05:00
Adam Mckaig
bde4ea23d1 Add Digital Ocean support 2015-06-04 22:43:56 -04:00
Mark Bainter
ff15699be0 Add support for environment variables
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.
2015-05-27 17:22:37 -05:00
Adam Mckaig
2d1c7fdfd9 Refactor to remove Terraform dependency
Closes #1
2015-02-09 16:37:30 -05:00