ansible/dhall/Host.dhall

18 lines
375 B
Text
Raw Normal View History

2024-11-26 04:03:32 +00:00
let ip = ./ip.dhall
let Address = < ip : ip.Address | dhcp >
let local =
\(suffix : Natural) ->
Address.ip (ip.address "192.168.1.${Natural/show suffix}" 24)
let Host
: Type
= { name : Text, address : Address }
let host
: Text -> Address -> Host
= \(name : Text) -> \(address : Address) -> { name, address }
in {Host, Address, host, local}