# {{ ansible_managed }}

# This is a POSIX shell fragment                -*- sh -*-

# OVN_CTL_OPTS: Extra options to pass to ovs-ctl.  This is, for example,
# a suitable place to specify --ovn-northd-wrapper=valgrind.

OVN_CTL_OPTS="\
    --db-nb-create-insecure-remote={{ ovn_ssl | ternary('no', 'yes') }} \
    --db-sb-create-insecure-remote={{ ovn_ssl | ternary('no', 'yes') }} \
    --db-nb-addr={{ ovn_ip }} \
    --db-sb-addr={{ ovn_ip }} \
    --db-nb-cluster-local-addr={{ ovn_ip }} \
    --db-sb-cluster-local-addr={{ ovn_ip }} \
{% if ovn_ssl %}
    --ovn-northd-ssl-key=/etc/ovn/server.key \
    --ovn-northd-ssl-cert=/etc/ovn/server.crt \
    --ovn-northd-ssl-ca-cert=/etc/ovn/ca.crt \
{% endif %}
    --ovn-northd-nb-db={{ ovn_central_northbound }} \
    --ovn-northd-sb-db={{ ovn_central_southbound }}{% if ansible_hostname != ovn_cluster_main_name %} \
    --db-nb-cluster-remote-addr={{ ovn_cluster_main_ip }} \
    --db-sb-cluster-remote-addr={{ ovn_cluster_main_ip }}{% endif %}"
