Try to fix hostname not showing in config

main
Daniel Ankers 2024-02-01 14:06:49 +00:00
parent 86095bd437
commit 6ef28c7c95
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{% macro systemsection(device) %}
{% macro systemsection(device,name) %}
system {
host-name {{ device['name'] }};
host-name {{ name }};
root-authentication {
encrypted-password "{{ device['config_context']['root_pw'] }}"; ## Client Higher
}

View File

@ -1,6 +1,6 @@
{% set device=({'name':name,'device_role':device_role,'primary_ip4':primary_ip4,'rack':rack,'interfaces':interfaces,'peering_interfaces':peering_interfaces,'config_context':config_context}) %}
{% import "juniper-macros.j2" as junos %}
{{ junos.systemsection(device) }}
{{ junos.systemsection(device,name) }}
{% if device_role['name'] == 'Leaf' %}
{{ junos.chassissection(device) }}
{% endif %}