Created
October 8, 2014 06:07
-
-
Save hogepodge/17b93b1c21eba027b978 to your computer and use it in GitHub Desktop.
test_ovs.pp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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