diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-17 13:57:51 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-17 13:58:31 -0400 |
| commit | 4e038a43cc9978af1015c53ab7cf27355d989069 (patch) | |
| tree | 36621411192ca62bbb552de5277e1ca3c4c35670 /src/Propellor/Spin.hs | |
| parent | a487fd07dc72ba506b3d185c4d9317e5a443faa3 (diff) | |
use Info to detect controller loops
Much less invasive than the other implementation.
Diffstat (limited to 'src/Propellor/Spin.hs')
| -rw-r--r-- | src/Propellor/Spin.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs index 401c9375..ecefbf6e 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 -> ControllerChain -> Host -> IO () -spin target relay cc hst = do +spin :: HostName -> Maybe HostName -> Host -> IO () +spin target relay hst = do cacheparams <- if viarelay then pure ["-A"] else toCommand <$> sshCachingParams hn @@ -89,9 +89,7 @@ spin target relay cc hst = do runcmd = "cd " ++ localdir ++ " && ./propellor " ++ cmd cmd = if viarelay then "--serialized " ++ shellEscape (show (Spin [target] (Just target))) - else if cc == mempty - then "--continue " ++ shellEscape (show (SimpleRun target)) - else "--continue " ++ shellEscape (show (ControlledRun target cc)) + else "--continue " ++ shellEscape (show (SimpleRun target)) -- 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, |
