Deploy /etc/schroot/buildd/fstab via puppet
authorPeter Palfrader <peter@palfrader.org>
Sat, 12 Jul 2014 10:35:29 +0000 (12:35 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 12 Jul 2014 10:35:29 +0000 (12:35 +0200)
modules/schroot/manifests/init.pp
modules/schroot/templates/schroot-buildd/fstab.erb [new file with mode: 0644]

index 731fd5b..5c0f360 100644 (file)
@@ -48,4 +48,9 @@ class schroot {
                content => template('schroot/schroot-dsa/fstab.erb'),
                require => Package['schroot'],
        }
+
+       file { '/etc/schroot/buildd/fstab':
+               content => template('schroot/schroot-buildd/fstab.erb'),
+               require => Package['schroot'],
+       }
 }
diff --git a/modules/schroot/templates/schroot-buildd/fstab.erb b/modules/schroot/templates/schroot-buildd/fstab.erb
new file mode 100644 (file)
index 0000000..eec5fdf
--- /dev/null
@@ -0,0 +1,22 @@
+# fstab: static file system information for chroots.
+# Note that the mount point will be prefixed by the chroot path
+# (CHROOT_PATH)
+#
+# <file system>        <mount point>   <type>  <options>       <dump>  <pass>
+
+<% if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture') and scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0].start_with?('kfreebsd') -%>
+# kFreeBSD version
+proc           /proc           linprocfs       defaults        0       0
+dev            /dev            devfs   rw,bind         0       0
+dev            /dev/fd         fdescfs rw,bind         0       0
+
+<% else -%>
+# Linux version
+/proc          /proc           none    rw,bind         0       0
+/sys           /sys            none    rw,bind         0       0
+/dev/pts       /dev/pts        none    rw,bind         0       0
+tmpfs-shm      /dev/shm        tmpfs   defaults,size=64m       0 0
+
+<% end %>
+
+/srv/build-trees       /build  none    rw,bind         0       0