summaryrefslogtreecommitdiff
path: root/doc/forum
diff options
context:
space:
mode:
authorJoey Hess2015-08-31 15:28:51 -0700
committerJoey Hess2015-08-31 15:28:51 -0700
commit7b67efec0ba70c636789f638fc3571394b4d899d (patch)
tree839b387fd33f110fd0f4068a862d4ec159b5ee83 /doc/forum
parent743e455569f19dc0de7392a974c51856244a327f (diff)
format
Diffstat (limited to 'doc/forum')
-rw-r--r--doc/forum/how_to_install_a_cluster_with_propellor/comment_1_e6860056989da82fd7cd8f374e209548._comment42
1 files changed, 18 insertions, 24 deletions
diff --git a/doc/forum/how_to_install_a_cluster_with_propellor/comment_1_e6860056989da82fd7cd8f374e209548._comment b/doc/forum/how_to_install_a_cluster_with_propellor/comment_1_e6860056989da82fd7cd8f374e209548._comment
index 21a2b80c..91659bb3 100644
--- a/doc/forum/how_to_install_a_cluster_with_propellor/comment_1_e6860056989da82fd7cd8f374e209548._comment
+++ b/doc/forum/how_to_install_a_cluster_with_propellor/comment_1_e6860056989da82fd7cd8f374e209548._comment
@@ -27,39 +27,33 @@ add more.
So, you'll probably want a way to generate a Host from a HostName with the
desired Properties you want nodes in the cluster to have:
-[[!format haskell """
-clusterNode :: HostName -> Host
-clusterNode hn = host hn
- & foo
- & bar
-"""]]
+ clusterNode :: HostName -> Host
+ clusterNode hn = host hn
+ & foo
+ & bar
Then you could feed a list of hostnames to defaultMain to finish the
config file:
-[[!format haskell """
-main :: IO ()
-main = defaultMain (map clusterNode hostnames)
- where
- hostnames =
- [ "node1"
- , "node2"
- -- etc
- ]
- -- alternatively...
- -- hostnames = map (\n -> "node" ++ show n) [1..100]
-"""]]
+ main :: IO ()
+ main = defaultMain (map clusterNode hostnames)
+ where
+ hostnames =
+ [ "node1"
+ , "node2"
+ -- etc
+ ]
+ -- alternatively...
+ -- hostnames = map (\n -> "node" ++ show n) [1..100]
Or, you could even look up the current hostname, and feed defaultMain
a Host containing that hostname; so this single propellor configuration
could be used on any number of hosts:
-[[!format haskell """
-main = IO ()
-main = do
- hn <- takeWhile (/= '\n') <$> readProcess "hostname" ["-f"]
- defaultMain [ clusterNode hn ]
-"""]]
+ main = IO ()
+ main = do
+ hn <- takeWhile (/= '\n') <$> readProcess "hostname" ["-f"]
+ defaultMain [ clusterNode hn ]
## Triggering propellor on nodes