From f6afd26bedebe9dcd27f3e81b6faedf9ce36d906 Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <ak@geant.org>
Date: Tue, 12 Nov 2024 15:19:04 +0000
Subject: [PATCH] SNMP ACL - optional field

---
 .../roles/bc_templates/routers/nokia/system/security/snmp.j2    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/system/security/snmp.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/system/security/snmp.j2
index 2a0f2797..8d7dd847 100644
--- a/geant/gap_ansible/roles/bc_templates/routers/nokia/system/security/snmp.j2
+++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/system/security/snmp.j2
@@ -20,7 +20,9 @@
           {% endif %}
             <access-permissions>r</access-permissions>
             <version>{{ community.version | default('v2c') }}</version>
+            {% if community.acl_name is defined %}
             <source-access-list>{{ community.acl_name }}</source-access-list>
+            {% endif %}
           </community>
         {% endfor %}
 
-- 
GitLab