Skip to content

Instantly share code, notes, and snippets.

@hogepodge
Created October 8, 2014 06:07
Show Gist options
  • Save hogepodge/17b93b1c21eba027b978 to your computer and use it in GitHub Desktop.
Save hogepodge/17b93b1c21eba027b978 to your computer and use it in GitHub Desktop.
test_ovs.pp
class test_ovs {
Exec {
path => '/usr/bin:/usr/sbin:/bin:/sbin',
}
::sysctl::value { 'net.ipv4.ip_forward':
value => '1',
}
$external_bridge = 'brex'
$external_device = 'eno67109432'
vs_bridge { $external_bridge:
ensure => present,
before => Vs_port[$external_device],
}
if $external_device != $external_bridge {
vs_port { $external_device:
ensure => present,
bridge => $external_bridge,
}
} else {
# External bridge already has the external device's IP, thus the external
# device has already been linked
}
}
class { 'test_ovs': }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment