aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/vpp.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/profile/base/vpp.pp')
-rw-r--r--manifests/profile/base/vpp.pp19
1 files changed, 16 insertions, 3 deletions
diff --git a/manifests/profile/base/vpp.pp b/manifests/profile/base/vpp.pp
index 4eff434..c9759f6 100644
--- a/manifests/profile/base/vpp.pp
+++ b/manifests/profile/base/vpp.pp
@@ -34,11 +34,24 @@ class tripleo::profile::base::vpp (
# If this is a ha scenario, we won't configure here.
$controllers = any2array(split(hiera('controller_node_ips'), ','))
if !empty($vpp_ctlplane_cidr) and size($controllers) == 1 {
- exec { 'vpp admin interface config':
- command => "ip link add vpp-admin type veth peer name veth-admin && ip li set dev veth-admin master br-ctlplane && ifconfig veth-admin up && vppctl create host-interface name vpp-admin && vppctl set int ip addr host-vpp-admin ${vpp_ctlplane_cidr} && vppctl set interface state host-vpp-admin up",
+ exec { 'vpp admin - kernel interface config':
+ command => "ip link add vpp-admin type veth peer name veth-admin && ip li set dev veth-admin master br-ctlplane && ifconfig veth-admin up",
path => ['/bin', '/sbin'],
unless => 'ip link show veth-admin | grep br-ctlplane',
- require => Class['fdio'],
+ require => Class['fdio'],
+ }
+ file_line { 'create vpp-admin interface':
+ path => '/etc/vpp/vpp-exec',
+ line => "create host-interface name vpp-admin",
+ } ->
+ file_line { 'set vpp-admin interface ip':
+ path => '/etc/vpp/vpp-exec',
+ line => "set int ip addr host-vpp-admin ${vpp_ctlplane_cidr}",
+ } ->
+ file_line { 'unshut vpp-admin interface':
+ path => '/etc/vpp/vpp-exec',
+ line => "set interface state host-vpp-admin up",
+ notify => Service['vpp'],
}
}
}