Make it provider ish
This commit is contained in:
parent
f5e682df78
commit
65461ecaa7
@ -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
17
manifests/ovs.pp
Normal 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",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user