diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-01-04 17:16:55 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-01-04 17:16:55 -0400 |
| commit | acdcff5ca48aeb08cb0b06621cf9889e1c628a86 (patch) | |
| tree | c57102d12541ec2be0c25bbaddeb8644a0cdeaf8 /src/Propellor/Info.hs | |
| parent | a9163ba3ab5e59b93dc901959b43c05e3fe6498a (diff) | |
| parent | df8d8eb5328b19dcde123d46d6cd9db0e2df88e9 (diff) | |
Merge branch 'joeyconfig'
Conflicts:
privdata.joey/privdata.gpg
Diffstat (limited to 'src/Propellor/Info.hs')
| -rw-r--r-- | src/Propellor/Info.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Propellor/Info.hs b/src/Propellor/Info.hs index a91f69c8..b7ca81b5 100644 --- a/src/Propellor/Info.hs +++ b/src/Propellor/Info.hs @@ -26,8 +26,13 @@ getOS = askInfo _os -- | Indidate that a host has an A record in the DNS. -- --- TODO check at run time if the host really has this address. --- (Can't change the host's address, but as a sanity check.) +-- When propellor is used to deploy a DNS server for a domain, +-- the hosts in the domain are found by looking for these +-- and similar properites. +-- +-- When propellor --spin is used to deploy a host, it checks +-- if the host's IP Property matches the DNS. If the DNS is missing or +-- out of date, the host will instead be contacted directly by IP address. ipv4 :: String -> Property ipv4 = addDNS . Address . IPv4 @@ -59,18 +64,12 @@ addDNS r = pureInfoProperty (rdesc r) $ mempty { _dns = S.singleton r } rdesc (NS d) = unwords ["NS", ddesc d] rdesc (TXT s) = unwords ["TXT", s] rdesc (SRV x y z d) = unwords ["SRV", show x, show y, show z, ddesc d] + rdesc (INCLUDE f) = unwords ["$INCLUDE", f] ddesc (AbsDomain domain) = domain ddesc (RelDomain domain) = domain ddesc RootDomain = "@" -sshPubKey :: String -> Property -sshPubKey k = pureInfoProperty ("ssh pubkey known") $ - mempty { _sshPubKey = Val k } - -getSshPubKey :: Propellor (Maybe String) -getSshPubKey = askInfo _sshPubKey - hostMap :: [Host] -> M.Map HostName Host hostMap l = M.fromList $ zip (map hostName l) l |
