]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Monkeysphere with ssh port
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 26 Sep 2010 01:28:04 +0000 (22:28 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 26 Sep 2010 01:28:04 +0000 (22:28 -0300)
manifests/nodo.pp
manifests/physical.pp
manifests/subsystems/monkeysphere.pp [new file with mode: 0644]
manifests/vserver.pp

index 75c472b9732bcbfe6233c55d93af798bb756add0..f7741a43fd57fbf7066c953c9070b74bbb285924 100644 (file)
@@ -20,15 +20,6 @@ class nodo {
   $ntp_pool     = "south-america.pool.ntp.org"
   $ntp_servers  = [ 'a.ntp.br', 'b.ntp.br', 'c.ntp.br' ]
 
-  # Monkeysphere
-  #
-  # Currently we don't have a defined policy regarding whether
-  # to publish all our node keys to public keyservers, so leave
-  # automatic publishing disabled for now.
-  #
-  $monkeysphere_publish_key = false
-  include monkeysphere
-
   # Email delivery configuration
   case $mail_delivery {
     'tunnel': {              
index a16f64a9d692c981893e1a7a7e11487b11ef38d3..dfb32b41066a6ec6ab9cca4c47ebc4572f65daf1 100644 (file)
@@ -48,6 +48,9 @@ class nodo::physical inherits nodo {
     port => '4900',
   }
 
+  # Monkeysphere configuration
+  monkeysphere_host { "$hostname": }
+
   # SMART monitoring
   include munin::plugins::smart
   munin::plugin { "smart_sda":
diff --git a/manifests/subsystems/monkeysphere.pp b/manifests/subsystems/monkeysphere.pp
new file mode 100644 (file)
index 0000000..35983ca
--- /dev/null
@@ -0,0 +1,12 @@
+# Define a monkeysphere host
+define monkeysphere_host($port = '') {
+  # Monkeysphere
+  #
+  # Currently we don't have a defined policy regarding whether
+  # to publish all our node keys to public keyservers, so leave
+  # automatic publishing disabled for now.
+  #
+  $monkeysphere_ssh_port    = $port
+  $monkeysphere_publish_key = 'mail'
+  include monkeysphere
+}
index c50fa470952d5cf2bb35af385964cbcc339481a3..57eb763433efa6c824d3e50412903c1861153d50 100644 (file)
@@ -18,14 +18,18 @@ class nodo::vserver inherits nodo {
 
   case $hosting_type {
     "direct": {
-      # Apply munin configuration for this node for
-      # directly hosted nodes.
-      Munin_node <<| title == $hostname |>>
+      # Apply munin and monkeysphere configuration for
+      # for directly hosted nodes.
+      Munin_node        <<| title == $hostname |>>
+      Monkeysphere_host <<| title == $hostname |>>
     }
     "third-party": {
       # Apply munin configuration for this node for third-party
       # hosted nodes.
       munin_node { "$hostname": }
+      monkeysphere_node { "$hostname":
+        $port => $node_ssh_port,
+      }
     }
   }
 
@@ -80,6 +84,11 @@ class nodo::vserver inherits nodo {
       port => "49$id",
     }
 
+    # Create a monkeysphere virtual resource to be realized in the node
+    @@monkeysphere_host { "$name":
+      port => "22$id",
+    }
+
     # Sound support
     if $sound {
       if !defined(File["/usr/local/sbin/create-sound-devices"]) {