Make it provider ish

This commit is contained in:
Endre Karlson 2012-10-06 22:12:33 +02:00
parent f5e682df78
commit 65461ecaa7
2 changed files with 22 additions and 12 deletions

View File

@ -1,13 +1,6 @@
class vswitch { class vswitch (
package { ["openvswitch-switch", "openvswitch-datapath-dkms"]: $provider = "ovs"
ensure => present ) {
} $cls = "vswitch::$provider"
include $cls
service { "openvswitch-switch":
ensure => true,
enable => true,
hasstatus => true,
status => "/etc/init.d/openvswitch-switch",
require => Package["openvswitch-switch"]
}
} }

17
manifests/ovs.pp Normal file
View File

@ -0,0 +1,17 @@
class vswitch::ovs {
case $::osfamily {
Debian: {
package {["openvswitch-switch", "openvswitch-datapath-dkms"]: ensure => present}
}
Ubuntu: {
package {["openvswitch-switch", "openvswitch-datapath-dkms"]: ensure => present}
service {"openvswitch-switch":
ensure => true,
enable => true,
hasstatus => true,
status => "/etc/init.d/openvswitch-switch",
}
}
}
}