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 ovn::params
include vswitch::ovs include vswitch::ovs
if $::osfamily == 'RedHat' { case $::osfamily {
augeas { 'sysconfig-ovn-northd': 'RedHat': {
context => '/files/etc/sysconfig/ovn-northd', $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} \ $ovn_northd_option_name = 'OVN_NORTHD_OPTS'
--db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes\"'",
before => Service['northd'],
} }
'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': service { 'northd':