You have to set up a test for that in the template. like this:
For the variables file you use the variable as you would do in command line. 1/1-24,2/1-24 and so one.
In the past we had to set up a config for every stack member's S/N in the variable file. I think this is still valid. This config is the same for all stack members except S/N and MAC-address. It includes all variable for all stack members and not only for this specific stack member. This is probably because if an other stack member takes over the stack it will get the config from the variable file with it's own S/N and therefor it has to have the variables for all stack members.
Tom C.
Original Message:
Sent: Jul 01, 2024 03:38 AM
From: vicky.pandey4752@gmail.com
Subject: Aruba 2930M switch Variable
Hi Tom,
Thank you for suggestion. I only having concern how does it know if the devices are in stack or standalone. As far i know for standalone port will be 1 while in stack it is 1/1. I am yet to perform testing of my template.
Original Message:
Sent: Jul 01, 2024 02:15 AM
From: tom.christensen@tietoevry.com
Subject: Aruba 2930M switch Variable
Hi. In this cases I normally use two variables per VLAN (tagged ports and untagged ports) in template and put in the respective ports in variable list. Here is a example on how to handle the VLAN setup.
Template:
vlan 10
name "ADM"
%if vlan_10_untag_port%
untagged %vlan_10_untag_port%
%else%
untagged %_sys_vlan_10_untag_command%
%endif%
%if _sys_use_dhcp=1%
ip address dhcp-bootp
%endif%
%if _sys_use_dhcp=0%
ip address %_sys_ip_address% %_sys_netmask%
%endif%
exit
vlan 99
name "Gjestenett"
no ip address
%if vlan_99_untag_port%
untagged %vlan_99_untag_port%
%endif%
%if vlan_99_tag_port%
tagged %vlan_99_tag_port%
%else%
tagged %_sys_vlan_10_untag_command%
%endif%
exit
--------------------------------------------------------------------------------------
Variables:
{
"CN83Hxxxxx": {
"_sys_lan_mac": "d0:67:26:xxxx",
"_sys_serial": "CN83xxxxxx"
},
"SG88JQNZBL": {
"_member.1.ports": "48",
"_member.2.ports": "48",
"_member.3.ports": "",
"_member.4.ports": "",
"_member.5.ports": "",
.
.
.
.
.
.
.
.
.
"_sys_use_dhcp": "1",
"_sys_vlan_10_tag_command": "",
"_sys_vlan_10_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48",
"_sys_vlan_99_tag_command": "",
"_sys_vlan_99_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48"
"_trunk.1": "1/A1,2/A2",
"_trunk.2": "",
},
"SG88JQNZBM": {
.
.
.
.
.
.
.
. "_sys_use_dhcp": "1",
"_sys_vlan_10_tag_command": "",
"_sys_vlan_10_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48",
"_sys_vlan_99_tag_command": "",
"_sys_vlan_99_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48"
}
}
Original Message:
Sent: Jun 27, 2024 12:23 PM
From: vicky.pandey4752@gmail.com
Subject: Aruba 2930M switch Variable
Hi All,
I am new to Aruba technology. We are working a project to migrate our Cisco to Aruba switch 2930M managed via Aruba Central. As we will have different number of devices on each floor, so a fix template will not work, instead might need to create variable based. Anyone can share me something to learn about variable which i can use in a template to check and apply config based on single switch or stack switch using same template.