
/mpls ldp set enabled=yes lsr-id={{ ldp.router_id }}

{% if 'ipv4' in loopback %}
/mpls ldp set transport-address={{ loopback.ipv4|ipaddr('address') }}
{% endif %}

{% if ldp.explicit_null|default(False) %}
/mpls ldp set use-explicit-null=yes
{% endif %}

{% for l in interfaces if ('ldp' in l) and not l.ldp.passive %}
/mpls ldp interface add interface={{ l.ifname }}
{% endfor %}
