Add Debian support for initialising DB

Change-Id: I68c0791e433a69a33129c6639ee220d08927c820
This commit is contained in:
Jake Yip 2019-12-18 16:16:01 +11:00
parent f11557a98a
commit 77bc7d77da
1 changed files with 18 additions and 6 deletions

View File

@ -11,13 +11,25 @@ class ovn::northd($dbs_listen_ip = '0.0.0.0') {
include ovn::params
include vswitch::ovs
if $::osfamily == 'RedHat' {
augeas { 'sysconfig-ovn-northd':
context => '/files/etc/sysconfig/ovn-northd',
changes => "set OVN_NORTHD_OPTS '\"--db-nb-addr=${dbs_listen_ip} --db-sb-addr=${dbs_listen_ip} \
--db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes\"'",
before => Service['northd'],
case $::osfamily {
'RedHat': {
$ovn_northd_context = '/files/etc/sysconfig/ovn-northd'
$ovn_northd_option_name = 'OVN_NORTHD_OPTS'
}
'Debian': {
$ovn_northd_context = '/files/etc/default/ovn-central'
$ovn_northd_option_name = 'OVN_CTL_OPTS'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem")
}
}
augeas { 'config-ovn-northd':
context => $ovn_northd_context,
changes => "set ${ovn_northd_option_name} '\"--db-nb-addr=${dbs_listen_ip} --db-sb-addr=${dbs_listen_ip} \
--db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes\"'",
before => Service['northd'],
}
service { 'northd':