summaryrefslogtreecommitdiff
path: root/Propellor/PrivData.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-04-12 14:14:20 -0400
committerJoey Hess <joey@kitenet.net>2014-04-12 14:14:20 -0400
commit9e9d0f1d410f806b546abed6055b25ac81f7042e (patch)
tree5a13b54820988c87f3567f90a1c5280763fc885e /Propellor/PrivData.hs
parent61ed9ef26c275ee8466e3d86b0a9b5ae275e3d4e (diff)
parentb3af5e44d0683033043511fefa3c5fc0ca2a4073 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'Propellor/PrivData.hs')
-rw-r--r--Propellor/PrivData.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Propellor/PrivData.hs b/Propellor/PrivData.hs
index 5adc9e94..c7af1aac 100644
--- a/Propellor/PrivData.hs
+++ b/Propellor/PrivData.hs
@@ -22,6 +22,9 @@ import Utility.Tmp
import Utility.SafeCommand
import Utility.Misc
+-- | When the specified PrivDataField is available on the host Propellor
+-- is provisioning, it provies the data to the action. Otherwise, it prints
+-- a message to help the user make the necessary private data available.
withPrivData :: PrivDataField -> (String -> Propellor Result) -> Propellor Result
withPrivData field a = maybe missing a =<< liftIO (getPrivData field)
where