{{OVN_NB_Connection}} in service file
This commit is contained in:
parent
44db5135f7
commit
d71e1ae2c8
|
@ -106,6 +106,9 @@
|
|||
when: force_new_ovn_download == True
|
||||
|
||||
|
||||
- name: Generate OVN NB Connection fact
|
||||
set_fact: OVN_NB_Connection="{% for host in groups[ovn_nb_group_name_rendered] %}tcp:{{ hostvars[host].host_loopback_IP }}:6641{% if not loop.last %},{% endif %}{% endfor %}"
|
||||
|
||||
|
||||
#Install the custom service to start OVS and OVN as required
|
||||
- name: "Copy /usr/sbin/ovsovn-service-manager.sh file"
|
||||
|
|
|
@ -9,8 +9,8 @@ echo "ZZZ $1"
|
|||
START(){
|
||||
hostname=$(hostname)
|
||||
loopbackIP={{host_loopback_IP}}
|
||||
controllerIP={{OVN_VIP}}
|
||||
echo "Starting OpenVSwitch and OVN on $hostname with $loopbackIP and pointing to OVN controller $controllerIP"
|
||||
|
||||
echo "Starting OpenVSwitch and OVN on $hostname with $loopbackIP and pointing to OVN controller {{OVN_NB_Connection}}"
|
||||
|
||||
DIR="/var/run/openvswitch/db.sock"
|
||||
if [ -d "$DIR" ]; then
|
||||
|
@ -23,7 +23,7 @@ START(){
|
|||
ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6640
|
||||
|
||||
ovs-vsctl set open . external-ids:ovn-bridge=br-int
|
||||
ovs-vsctl set open . external-ids:ovn-remote=tcp:$controllerIP:6642
|
||||
ovs-vsctl set open . external-ids:ovn-remote={{OVN_NB_Connection}}
|
||||
ovs-vsctl set open . external-ids:ovn-encap-type=geneve
|
||||
ovs-vsctl set open . external-ids:ovn-encap-ip=$loopbackIP
|
||||
/usr/share/ovn/scripts/ovn-ctl start_controller
|
||||
|
|
Loading…
Reference in New Issue