aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/etc/crypttab/kvm3
-rw-r--r--files/etc/fstab/kvm2
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/kvm.pp21
4 files changed, 27 insertions, 0 deletions
diff --git a/files/etc/crypttab/kvm b/files/etc/crypttab/kvm
new file mode 100644
index 0000000..20009d6
--- /dev/null
+++ b/files/etc/crypttab/kvm
@@ -0,0 +1,3 @@
+# <target name> <source device> <key file> <options>
+root /dev/mapper/vg-root none luks,cipher=aes-cbc-essiv:sha256
+vservers /dev/mapper/vg-vservers none luks,cipher=aes-cbc-essiv:sha256
diff --git a/files/etc/fstab/kvm b/files/etc/fstab/kvm
new file mode 100644
index 0000000..7cd585a
--- /dev/null
+++ b/files/etc/fstab/kvm
@@ -0,0 +1,2 @@
+/dev/mapper/root / ext4 defaults,errors=remount-ro 0 1
+/dev/mapper/vservers /var/vservers ext4 defaults,errors=remount-ro 0 2
diff --git a/manifests/init.pp b/manifests/init.pp
index 060d18f..6fdb71d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -119,3 +119,4 @@ import "plug.pp"
import "appliance.pp"
import "dns.pp"
import "tor.pp"
+import "kvm.pp"
diff --git a/manifests/kvm.pp b/manifests/kvm.pp
new file mode 100644
index 0000000..09af17f
--- /dev/null
+++ b/manifests/kvm.pp
@@ -0,0 +1,21 @@
+class nodo::kvm inherits nodo::physical {
+ # fstab
+ file { "/etc/fstab":
+ source => "puppet://$server/modules/nodo/etc/fstab/kvm",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ notify => Exec['update-initramfs'],
+ }
+
+ # crypttab
+ file { "/etc/crypttab":
+ source => "puppet://$server/modules/nodo/etc/crypttab/kvm",
+ owner => "root",
+ group => "root",
+ mode => 0644,
+ ensure => present,
+ notify => Exec['update-initramfs'],
+ }
+}