ansible/dhall/Server.dhall
2024-11-25 23:03:32 -05:00

18 lines
429 B
Text

let Simple =
{ Type = { address : Text, hostnames : List Text }
, default.hostnames = [] : List Text
}
let Proxmox = ./Proxmox.dhall
let Server = < Simple : Simple | Proxmox : Proxmox >
let ipAddress =
\(server : Server) ->
merge
{ Simple = \(s : Simple) -> s.address
, Proxmox = \(s : Proxmox.Proxmox) -> Proxmox.ipAddress s
}
server
in { ipAddress }