tasks/host.pp in gepetto-0.0.9 vs tasks/host.pp in gepetto-0.0.10
- old
+ new
@@ -11,27 +11,30 @@
package { kqemu-source:
ensure => "latest",
require => Package[qemu]
}
-exec { "modass-kqemu":
- # modass returns 249 with non-inter ...
- command => 'module-assistant --non-inter a-i kqemu || dpkg -l "kqemu-modules-`uname -r`" | grep ^ii',
- unless => 'dpkg -l "kqemu-modules-`uname -r`" | grep ^ii',
- require => Package[kqemu-source]
+if $operatingsystem == Debian {
+ # under Ubuntu, dkms does the job
+ exec { "modass-kqemu":
+ # modass returns 249 with non-inter ...
+ command => 'module-assistant --non-inter a-i kqemu || dpkg -l "kqemu-modules-`uname -r`" | grep ^ii',
+ unless => 'dpkg -l "kqemu-modules-`uname -r`" | grep ^ii' ,
+ require => Package[kqemu-source]
+ }
+
+ exec { "add kqemu in /etc/modules":
+ command => "echo kqemu >> /etc/modules",
+ unless => "grep kqemu /etc/modules",
+ require => Exec["modass-kqemu"]
+ }
}
-exec { "add kqemu in /etc/modules":
- command => "echo kqemu >> /etc/modules",
- unless => "grep kqemu /etc/modules",
- require => Exec["modass-kqemu"]
-}
-
exec { "modprobe-kqemu":
command => "modprobe kqemu",
unless => "lsmod | grep kqemu",
- require => Exec["modass-kqemu"]
+ require => Package[kqemu-source]
}
file { "/dev/kqemu":
# default permissions on debian, but not on ubuntu
mode => 666,
@@ -71,5 +74,7 @@
iptables -t nat -A POSTROUTING -s 172.20.0.1/24 -o eth0 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=1
',
require => Package[qemu]
}
+
+package { [debootstrap, grub]: }