summaryrefslogtreecommitdiff
path: root/src/Propellor/Spin.hs
diff options
context:
space:
mode:
authorJoey Hess2015-10-16 14:23:14 -0400
committerJoey Hess2015-10-16 14:23:14 -0400
commit4b848fedbf2d3a7b7ba94abd2b0ed8526df2fac7 (patch)
tree8e8d067bebb2e82e0e8354ff871791f2e1c7114f /src/Propellor/Spin.hs
parent51634a1bfc091b0c2e005e58266771dab0710ffe (diff)
parente66b62f40bcb29ca62c905dabe87cc6e91a6bccd (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Spin.hs')
-rw-r--r--src/Propellor/Spin.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs
index ecefbf6e..401c9375 100644
--- a/src/Propellor/Spin.hs
+++ b/src/Propellor/Spin.hs
@@ -40,8 +40,8 @@ commitSpin = do
void $ actionMessage "Push to central git repository" $
boolSystem "git" [Param "push"]
-spin :: HostName -> Maybe HostName -> Host -> IO ()
-spin target relay hst = do
+spin :: HostName -> Maybe HostName -> ControllerChain -> Host -> IO ()
+spin target relay cc hst = do
cacheparams <- if viarelay
then pure ["-A"]
else toCommand <$> sshCachingParams hn
@@ -89,7 +89,9 @@ spin target relay hst = do
runcmd = "cd " ++ localdir ++ " && ./propellor " ++ cmd
cmd = if viarelay
then "--serialized " ++ shellEscape (show (Spin [target] (Just target)))
- else "--continue " ++ shellEscape (show (SimpleRun target))
+ else if cc == mempty
+ then "--continue " ++ shellEscape (show (SimpleRun target))
+ else "--continue " ++ shellEscape (show (ControlledRun target cc))
-- Check if the Host contains an IP address that matches one of the IPs
-- in the DNS for the HostName. If so, the HostName is used as-is,