Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VXLAN Role Template - Loopback Description should add quotes #106

Open
FredPocai opened this issue Oct 9, 2021 · 0 comments
Open

VXLAN Role Template - Loopback Description should add quotes #106

FredPocai opened this issue Oct 9, 2021 · 0 comments

Comments

@FredPocai
Copy link

In the interfaces role, a wordcount filter is applied to the description to enquote it if the description is longer than 1 word. I am suggesting that this template be remedied to have the same behavior applied to loopbacks.

{% if loopback.description is defined %}
{% if loopback.description %}
description {{ loopback.description }}
{% else %}
no description {{ loopback.description }}
{% endif %}
{% endif %}

Suggested replacement for this snippet:

      {% if loopback.description is defined %}
        {% if loopback.description %}
          {% if loopback.description|wordcount >1 %}
 description "{{ loopback.description }}"
          {% else %}
 description {{ loopback.description }}
          {% endif %}
        {% else %}
 no description {{ loopback.description }}
        {% endif %}
      {% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant