]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Adding nodo::host class
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 20 Jan 2013 18:15:47 +0000 (16:15 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 20 Jan 2013 18:15:47 +0000 (16:15 -0200)
manifests/host.pp [new file with mode: 0644]
manifests/kvm.pp
manifests/physical.pp

diff --git a/manifests/host.pp b/manifests/host.pp
new file mode 100644 (file)
index 0000000..fe1ca61
--- /dev/null
@@ -0,0 +1,63 @@
+# Fully capable node able to host other nodes
+class nodo::host inherits nodo {
+  include initramfs
+  include modprobe
+  include firewire
+  include sysctl
+  include utils::physical
+  include resolver
+  include monkeysphere_nodo
+
+  class { 'syslog-ng': }
+
+  # Firewall configuration
+  include firewall
+
+  # Vserver configuration
+  $vserver_vdirbase = "/var/vservers"
+  include vserver::host
+
+  if $use_nagios != false {
+    if $use_nagios_fqdn == true {
+      include nagios::target::fqdn
+    }
+    else {
+      include nagios::target
+    }
+    nagios::service::ping { "$fqdn": }
+  }
+
+  # Time configuration
+  case $ntpdate {
+    false:   { include timezone }
+    default: { include ntpdate  }
+  }
+
+  # SSH Server
+  #
+  # We need to restrict listen address so multiple instances
+  # can live together in the same physical host.
+  #
+  case $sshd_listen_address {
+    '': { $sshd_listen_address = [ "$ipaddress", '127.0.0.1' ] }
+  }
+
+  class { 'sshd':
+    listen_address          => $sshd_listen_address,
+    password_authentication => $sshd_password_authentication,
+    shared_ip               => $sshd_shared_ip,
+    tcp_forwarding          => $sshd_tcp_forwarding,
+    hardened_ssl            => $sshd_hardened_ssl,
+    print_motd              => $sshd_print_motd,
+  }
+
+  backupninja::sys { "sys":
+    ensure => present,
+  }
+
+  # Munin configuration
+  munin_node { "$hostname":
+    port => '4900',
+  }
+
+}
index 01bfaecbea70ae172b9189c0fd3f40f3a65648d6..2f4d6320be7bca9cc8518329dec3d8cdda128060 100644 (file)
@@ -1,64 +1,4 @@
-class nodo::kvm inherits nodo {
-  include syslog-ng
-  include initramfs
-  include modprobe
-  include firewire
-  include sysctl
-  include ups
-  include utils::physical
-  include resolver
-  include monkeysphere_nodo
-
-  # Firewall configuration
-  include firewall
-
-  # Vserver configuration
-  $vserver_vdirbase = "/var/vservers"
-  include vserver::host
-
-  if $use_nagios != false {
-    if $use_nagios_fqdn == true {
-      include nagios::target::fqdn
-    }
-    else {
-      include nagios::target
-    }
-    nagios::service::ping { "$fqdn": }
-  }
-
-  # Time configuration
-  case $ntpdate {
-    false:   { include timezone }
-    default: { include ntpdate  }
-  }
-
-  # SSH Server
-  #
-  # We need to restrict listen address so multiple instances
-  # can live together in the same physical host.
-  #
-  case $sshd_listen_address {
-    '': { $sshd_listen_address = [ "$ipaddress" ] }
-  }
-
-  class { 'sshd':
-    listen_address          => $sshd_listen_address,
-    password_authentication => $sshd_password_authentication,
-    shared_ip               => $sshd_shared_ip,
-    tcp_forwarding          => $sshd_tcp_forwarding,
-    hardened_ssl            => $sshd_hardened_ssl,
-    print_motd              => $sshd_print_motd,
-  }
-
-  backupninja::sys { "sys":
-    ensure => present,
-  }
-
-  # Munin configuration
-  munin_node { "$hostname":
-    port => '4900',
-  }
-
+class nodo::kvm inherits nodo::host {
   # fstab
   file { "/etc/fstab":
     source  => "puppet://$server/modules/nodo/etc/fstab/kvm",
index 4e85f100dd091c57fada57cf5e5f9fa95a85b2ce..0d797fc9901b2140cb716c9b93335ff7c85c20d4 100644 (file)
@@ -1,67 +1,6 @@
-class nodo::physical inherits nodo {
-  include initramfs
-  include modprobe
-  include firewire
-  include sysctl
+class nodo::physical inherits nodo::host {
   include ups
-  include utils::physical
   include smartmontools
-  include resolver
-  include monkeysphere_nodo
-
-  class { 'syslog-ng': }
-
-  # Firewall configuration
-  include firewall
-
-  # Vserver configuration
-  $vserver_vdirbase = "/var/vservers"
-  include vserver::host
-
-  if $use_nagios != false {
-    if $use_nagios_fqdn == true {
-      include nagios::target::fqdn
-    }
-    else {
-      include nagios::target
-    }
-    nagios::service::ping { "$fqdn": }
-  }
-
-  # Time configuration
-  case $ntpdate {
-    false:   { include timezone }
-    default: { include ntpdate  }
-  }
-
-  # SSH Server
-  #
-  # We need to restrict listen address so multiple instances
-  # can live together in the same physical host.
-  #
-  case $sshd_listen_address {
-    '': { $sshd_listen_address = [ "$ipaddress", '127.0.0.1' ] }
-  }
-
-  class { 'sshd':
-    listen_address          => $sshd_listen_address,
-    password_authentication => $sshd_password_authentication,
-    shared_ip               => $sshd_shared_ip,
-    tcp_forwarding          => $sshd_tcp_forwarding,
-    hardened_ssl            => $sshd_hardened_ssl,
-    print_motd              => $sshd_print_motd,
-    ports                   => $sshd_ports,
-    use_pam                 => $sshd_use_pam,
-  }
-
-  backupninja::sys { "sys":
-    ensure => present,
-  }
-
-  # Munin configuration
-  munin_node { "$hostname":
-    port => '4900',
-  }
 
   # SMART monitoring
   include munin::plugins::smart