]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
add cluster rules
authorStephen Gran <steve@lobefin.net>
Sun, 25 Aug 2013 21:47:45 +0000 (22:47 +0100)
committerStephen Gran <steve@lobefin.net>
Sun, 25 Aug 2013 21:47:45 +0000 (22:47 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/roles/manifests/pubsub.pp

index a43423efe109c05ba39654e8bb8e24672f7b6d7d..e5740326ef3df0a176c827d8a71349ecdb21b325 100644 (file)
@@ -57,4 +57,16 @@ class roles::pubsub {
                description => 'rabbitmq connections',
                rule        => '&SERVICE_RANGE(tcp, 5672, $HOST_DEBIAN_V6)'
        }
+
+       if $::hostname == $cc_master {
+               $you = $cc_secondary
+       } else {
+               $you = $cc_master
+       }
+
+       @ferm::rule { 'rabbitmq_cluster':
+               domain      => '(ip,ip6)',
+               description => 'rabbitmq cluster connections',
+               rule        => "proto tcp mod state state (NEW) saddr (${you}) ACCEPT"
+       }
 }