From 363b626d71402d22c4f5247392a8b96d2e808747 Mon Sep 17 00:00:00 2001 From: serge1cohen Date: Fri, 1 Nov 2019 15:34:27 +0000 Subject: --- doc/forum/Conceptual_:_HostName_vs._Domain.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/forum/Conceptual_:_HostName_vs._Domain.mdwn diff --git a/doc/forum/Conceptual_:_HostName_vs._Domain.mdwn b/doc/forum/Conceptual_:_HostName_vs._Domain.mdwn new file mode 100644 index 00000000..334c9d82 --- /dev/null +++ b/doc/forum/Conceptual_:_HostName_vs._Domain.mdwn @@ -0,0 +1,22 @@ +Hello, + +Writing properties, I often hesitate between using types `HostName` or `Domain` for the FQDN of a machine. +This is not 'very important' since both are "just" `String`, but the type carries semantics and I'd rather keep consistent (helps understanding the code better). + +Here are the docs : + +http://hackage.haskell.org/package/propellor-5.9.1/docs/Propellor-Types-OS.html#t:HostName +http://hackage.haskell.org/package/propellor-5.9.1/docs/Propellor-Types-Dns.html#t:Domain + +So `HostName` documentation to me looks like really corresponding to a machine's FQDN, but may also be the IP of the machine. +Conversely `Domain` is not documented (in its module) but it is used in the 'domain part of the FQDN' in some modules; eg. in Propellor/Property/Hostname.hs +Even clearer is the `Propellor.Property.DNS` module in which I clearly understand the choice of `Domain` vs. `HostName`. + +Still it seems to me that sometimes one sees `Domain` where a `HostName` would be expected. One such example is in `LetsEncrypt` +Maybe I am just to confused by a few places where `Domain` is used while I would (maybe wrongly) expect `HostName` ? + +What am I missing ? + +Cheers, + +Serge. -- cgit v1.2.3