aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/etc/crypttab/desktop6
-rw-r--r--files/etc/crypttab/server (renamed from files/etc/crypttab)0
-rw-r--r--files/etc/fstab/desktop5
-rw-r--r--files/etc/fstab/server (renamed from files/etc/fstab)0
-rw-r--r--files/etc/fstab/vserver (renamed from files/etc/fstab-vserver)0
-rw-r--r--manifests/init.pp36
6 files changed, 40 insertions, 7 deletions
diff --git a/files/etc/crypttab/desktop b/files/etc/crypttab/desktop
new file mode 100644
index 0000000..55f2040
--- /dev/null
+++ b/files/etc/crypttab/desktop
@@ -0,0 +1,6 @@
+# <target name> <source device> <key file> <options>
+root /dev/mapper/vg-root none luks,cipher=aes-cbc-essiv:sha256
+home /dev/mapper/vg-home none luks,cipher=aes-cbc-essiv:sha256
+var /dev/mapper/vg-var none luks,cipher=aes-cbc-essiv:sha256
+vservers /dev/mapper/vg-vservers none luks,cipher=aes-cbc-essiv:sha256
+cswap /dev/sda1 /dev/random swap,cipher=aes-cbc-essiv:sha256
diff --git a/files/etc/crypttab b/files/etc/crypttab/server
index 35f0521..35f0521 100644
--- a/files/etc/crypttab
+++ b/files/etc/crypttab/server
diff --git a/files/etc/fstab/desktop b/files/etc/fstab/desktop
new file mode 100644
index 0000000..1da30de
--- /dev/null
+++ b/files/etc/fstab/desktop
@@ -0,0 +1,5 @@
+/dev/mapper/cswap none swap sw 0 0
+/dev/mapper/root / ext3 defaults,errors=remount-ro 0 1
+/dev/mapper/home /home ext3 defaults,errors=remount-ro 0 0
+/dev/mapper/var /var ext3 defaults,errors=remount-ro 0 0
+/dev/mapper/vservers /var/vservers ext3 defaults,errors=remount-ro 0 0
diff --git a/files/etc/fstab b/files/etc/fstab/server
index 0878617..0878617 100644
--- a/files/etc/fstab
+++ b/files/etc/fstab/server
diff --git a/files/etc/fstab-vserver b/files/etc/fstab/vserver
index 8b82d56..8b82d56 100644
--- a/files/etc/fstab-vserver
+++ b/files/etc/fstab/vserver
diff --git a/manifests/init.pp b/manifests/init.pp
index 8133e45..ccf94d4 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -110,7 +110,7 @@ class nodo {
}
}
-class nodo::server inherits nodo {
+class nodo::physical inherits nodo {
include syslog-ng
include firewall
include vserver::host
@@ -144,9 +144,16 @@ class nodo::server inherits nodo {
ensure => present,
}
+ # Munin configuration
+ munin_node { "$hostname":
+ port => '4900',
+ }
+}
+
+class nodo::server inherits nodo::physical {
# fstab
file { "/etc/fstab":
- source => "puppet://$server/modules/nodo/etc/fstab",
+ source => "puppet://$server/modules/nodo/etc/fstab/server",
owner => "root",
group => "root",
mode => 0644,
@@ -155,16 +162,31 @@ class nodo::server inherits nodo {
# crypttab
file { "/etc/crypttab":
- source => "puppet://$server/modules/nodo/etc/crypttab",
+ source => "puppet://$server/modules/nodo/etc/crypttab/server",
owner => "root",
group => "root",
mode => 0644,
ensure => present,
}
+}
- # Munin configuration
- munin_node { "$hostname":
- port => '4900',
+class nodo::desktop inherits nodo::physical {
+ # fstab
+ file { "/etc/fstab":
+ source => "puppet://$desktop/modules/nodo/etc/fstab/desktop",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ }
+
+ # crypttab
+ file { "/etc/crypttab":
+ source => "puppet://$desktop/modules/nodo/etc/crypttab/desktop",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
}
}
@@ -221,7 +243,7 @@ class nodo::vserver inherits nodo {
# Some nodes need a lot of space at /tmp otherwise some admin
# tasks like backups might not run.
file { "/etc/vservers/${name}/fstab":
- source => "puppet://$server/modules/nodo/etc/fstab-vserver",
+ source => "puppet://$server/modules/nodo/etc/fstab/vserver",
owner => "root",
group => "root",
mode => 0644,