aruba: truncate long strings

This commit is contained in:
jeltz 2022-09-05 11:49:19 +02:00
parent b55d81d6cc
commit 1d4534f19c
Signed by: jeltz
GPG key ID: 800882B66C0C3326
3 changed files with 11 additions and 7 deletions

View file

@ -14,7 +14,10 @@
aruba__dns_servers:
- 10.128.0.1
- 2a09:6840:128:0:1::1
aruba__dns_domain_name: switch.infra.auro.re
aruba__dns_domain_names:
- switch.infra.auro.re
- infra.auro.re
- auro.re
aruba__manager_password: "P@ssw0rd!"
aruba__operator_password: "P@ssw0rd!"
aruba__default_gateways:

View file

@ -5,6 +5,7 @@ aruba__interfaces: {}
aruba__default_gateways: []
aruba__ssh_enabled: False
aruba__rest_enabled: True
aruba__dns_domain_names: []
aruba__loop_protect_disable_timer: 30
aruba__loop_protect_tx_interval: 3
...

View file

@ -1,6 +1,6 @@
{{ ansible_managed | comment(decoration="; ") }}
hostname {{ aruba__hostname | enquote }}
hostname {{ aruba__hostname | truncate(32) | enquote }}
include-credentials
@ -20,9 +20,9 @@ time timezone 60
ip dns server-address priority {{ loop.index }} {{ addr | ipaddr }}
{% endfor %}
{% if aruba__dns_domain_name is defined %}
ip dns domain-name {{ aruba__dns_domain_name | enquote }}
{% endif %}
{% for domain in aruba__dns_domain_names[:5] %}
ip dns domain-name {{ domain | enquote }}
{% endfor %}
; TODO
{% if False %}
@ -98,7 +98,7 @@ ipv6 default-gateway {{ aruba__default_gateways | ipv6 | first }}
{% for id, vlan in aruba__vlans.items() %}
vlan {{ id | int }}
{% if vlan.name is defined %}
name {{ vlan.name | enquote }}
name {{ vlan.name | truncate(32) | enquote }}
{% endif %}
{%
set untagged =
@ -142,7 +142,7 @@ set tagged =
{% for id, iface in aruba__interfaces.items() %}
interface {{ id | int }}
{% if iface.name is defined %}
name {{ iface.name | enquote }}
name {{ iface.name | truncate(32) | enquote }}
{% endif %}
{% if iface.enabled | default(True) %}
enable