You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 4 година
123456789101112131415
  1. output "hostvars" {
  2. value = {
  3. for hostname, host in var.vms: hostname =>
  4. {
  5. external_ip = hcloud_server.vms[hostname].ipv4_address
  6. ansible_host = hcloud_server.vms[hostname].ipv4_address
  7. #internal_ip = hcloud_server_network.vms[hostname].ip
  8. volumes = {
  9. for volumename, volume in lookup(host, "volumes", {}): volumename => merge(volume,{
  10. device = hcloud_volume.volumes["${hostname}--${volumename}"].linux_device
  11. })
  12. }
  13. }
  14. }
  15. }