1
1
mirror of https://github.com/adammck/terraform-inventory synced 2024-11-23 08:32:05 +01:00

Update fixtures

This commit is contained in:
Adam Mckaig 2015-06-05 00:03:42 -04:00
parent 5e11666d41
commit f290d6dfb6
3 changed files with 19 additions and 14 deletions

@ -23,7 +23,7 @@ Ansible doesn't (seem to) support calling the inventory script with parameters,
so you can specify the path to the state file using the `TI_TFSTATE` environment so you can specify the path to the state file using the `TI_TFSTATE` environment
variable, like so: variable, like so:
TI_TFSTATE=deploy/terraform.tfstate ansible-playbook --inventory-file=terraform-inventory TI_TFSTATE=deploy/terraform.tfstate ansible-playbook --inventory-file=terraform-inventory deploy/playbook.yml
Alternately, you can create a little shell script and call that. Something like: Alternately, you can create a little shell script and call that. Something like:

@ -17,6 +17,8 @@ resource "aws_instance" "web-aws" {
ami = "ami-96a818fe" ami = "ami-96a818fe"
instance_type = "t2.micro" instance_type = "t2.micro"
subnet_id = "${var.aws_subnet_id}" subnet_id = "${var.aws_subnet_id}"
associate_public_ip_address = true
key_name = "terraform-inventory"
root_block_device = { root_block_device = {
delete_on_termination = true delete_on_termination = true
} }
@ -27,5 +29,5 @@ resource "digitalocean_droplet" "web-do" {
name = "terraform-inventory-1" name = "terraform-inventory-1"
region = "nyc1" region = "nyc1"
size = "512mb" size = "512mb"
ssh_keys = [55015] ssh_keys = [862272]
} }

@ -1,6 +1,6 @@
{ {
"version": 1, "version": 1,
"serial": 11, "serial": 13,
"modules": [ "modules": [
{ {
"path": [ "path": [
@ -11,18 +11,21 @@
"aws_instance.web-aws": { "aws_instance.web-aws": {
"type": "aws_instance", "type": "aws_instance",
"primary": { "primary": {
"id": "i-366736e6", "id": "i-e8f3a238",
"attributes": { "attributes": {
"ami": "ami-96a818fe", "ami": "ami-96a818fe",
"associate_public_ip_address": "true",
"availability_zone": "us-east-1d", "availability_zone": "us-east-1d",
"ebs_block_device.#": "0", "ebs_block_device.#": "0",
"ebs_optimized": "false", "ebs_optimized": "false",
"ephemeral_block_device.#": "0", "ephemeral_block_device.#": "0",
"id": "i-366736e6", "id": "i-e8f3a238",
"instance_type": "t2.micro", "instance_type": "t2.micro",
"private_dns": "ip-10-0-0-4.ec2.internal", "key_name": "terraform-inventory",
"private_ip": "10.0.0.4", "private_dns": "ip-10-0-0-12.ec2.internal",
"private_ip": "10.0.0.12",
"public_dns": "", "public_dns": "",
"public_ip": "52.7.58.202",
"root_block_device.#": "1", "root_block_device.#": "1",
"root_block_device.0.delete_on_termination": "true", "root_block_device.0.delete_on_termination": "true",
"root_block_device.0.iops": "0", "root_block_device.0.iops": "0",
@ -53,7 +56,7 @@
"region": "nyc1", "region": "nyc1",
"size": "512mb", "size": "512mb",
"ssh_keys.#": "1", "ssh_keys.#": "1",
"ssh_keys.0": "55015", "ssh_keys.0": "862272",
"status": "active" "status": "active"
} }
} }