# {{ 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-ic-nb-create-insecure-remote={{ ovn_ssl | ternary('no', 'yes') }} \
    --db-ic-sb-create-insecure-remote={{ ovn_ssl | ternary('no', 'yes') }} \
    --db-ic-nb-addr=[{{ ovn_ip }}] \
    --db-ic-sb-addr=[{{ ovn_ip }}] \
    --db-ic-nb-cluster-local-addr=[{{ ovn_ip }}] \
    --db-ic-sb-cluster-local-addr=[{{ ovn_ip }}] \
    --ovn-northd-nb-db={{ ovn_central_northbound }} \
    --ovn-northd-sb-db={{ ovn_central_southbound }} \
{% if ovn_ssl %}
    --ovn-ic-ssl-key=/etc/ovn/server.key \
    --ovn-ic-ssl-cert=/etc/ovn/server.crt \
    --ovn-ic-ssl-ca-cert=/etc/ovn/ca.crt \
{% endif %}
    --ovn-ic-nb-db={{ ovn_ic_northbound }} \
    --ovn-ic-sb-db={{ ovn_ic_southbound }}{% if ansible_hostname != ovn_ic_cluster_main_name %} \
    --db-ic-nb-cluster-remote-addr={{ ovn_ic_cluster_main_ip }} \
    --db-ic-sb-cluster-remote-addr={{ ovn_ic_cluster_main_ip }}{% endif %}"
