#!/bin/sh

terraform show -json|jq '{servers: {hosts: ([.values.root_module.resources | .[] | select(.type == "openstack_compute_instance_v2") | select(.name != "ansible_controller") | {name: .values.name, ip: .values.access_ip_v4 } | select(.ip != null) | {(.ip): null}] | add)}}'
