Managing Variable Files
Aruba Central (on-premises) allows you to configure multiple devices in bulk using templates. However, in some cases, the configuration parameters may vary per device. To address this, Aruba Central (on-premises) identifies some customizable CLI parameters as variables and allows you to modify the definitions for these variables as per your requirements.
You can download a sample file with variables for a template group or for the devices deployed in a template group, update the variable definitions, upload the file with the customized definitions, and apply these configuration changes in bulk.
Downloading Sample Variables File
The sample variables file includes a set of sample variables that the users can customize. You can download the sample variables file in the JSONJavaScript Object Notation. JSON is an open-standard, language-independent, lightweight data-interchange format used to transmit data objects consisting of attribute–value pairs. JSON uses a "self-describing" text format that is easy for humans to read and write, and that can be used as a data format by any programming language. or CSVComma-Separated Values. A file format that stores tabular data in the plain text format separated by commas. format.
To download a sample variables file:
1. In the app, set the filter to one of the template group under .
2. Under , click > .
3. Click the icon.
4. Click .
5. Select one of the following formats to download the sample variables file:
JSON—shows the file in JSON format.
CSV—Shows the variables in different columns.
6. Click . The sample variables file is saved to your local directory.
Modifying a Variable File
The CSV file includes the following columns for which the variable definitions are mandatory:
—For serial number of the device
MACMedia Access Control. A MAC address is a unique identifier assigned to network interfaces for communications on a network. address of the device
—ForAruba Central to parse the modified definition.
—To indicate the modification status of the device. The value for this column is set to N in the sample variables file. When you edit a variable definition, set the column to to allowPredefined Variables for Aruba Switches
The system defined variables in the sample variables files are indicated with
prefix.Table 1 lists the predefined variables for switches.
Variable Name |
Description |
Variable Value |
---|---|---|
|
Populates gateway IP address. |
10.22.159.1 |
|
Maintains unique host name. |
HP-2920-48G-POEP |
|
Indicates the IP address of the device. |
10.22.159.201 |
|
Populates module lines |
module 1 type j9729a |
|
Netmask of the device. |
255.255.255.0 |
|
Represents Out of BandBand refers to a specified range of frequencies of electromagnetic radiation. Management (OOBM) block. |
oobm ip address dhcp-bootp exit |
|
Populates engine ID. |
00:00:00:0b:00:00:5c:b9:01:22:4c:00 |
|
Represents stack block |
stacking member 1 type "J9729A" mac-address 5cb901-224c00 exit |
|
Represents the first two lines of the configuration file. Ensure that this variable is the first line in the template. |
; J9729A Configuration Editor; Created on release #WB.16.03.0003+ ; Ver #0f:3f.f3.b8.ee.34.79.3c.29.eb.9f.fc.f3.ff.37.ef:91 |
|
Indicates DHCPDynamic Host Configuration Protocol. A network protocol that enables a server to automatically assign an IP address to an IP-enabled device from a defined range of numbers configured for a given network. status (true or false) of VLANVirtual Local Area Network. In computer networking, a single Layer 2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them through one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN, or VLAN. 1 |
0 |
|
Indicates untagged ports of VLAN 1 |
1-28,A1-A2 |
|
Indicates tagged ports of VLAN 1 |
28-48 |
|
The Aruba Central re-imports the values for these mandatory variables when it processes the running configuration of the device. and are mandatory variables that must have the values populated, irrespective of their use in the template. If there is no value set for these variables, |
Predefined Variables for APs
For APs, the sample variables file includes the
variable for which you can specify a value to allow new APs to join the AP cluster.Important Points to Note
The following conditions apply to the variable files:
The variable names must be on the left side of condition and its value must be defined on the right side. For example, %if var=100% is supported and %if 100=var% is not supported.
The < or <= or > or >= operators should have only numeric integer value on the right side. The variables used in these 4 operations are compared as integer after flooring. For example, if any float value is set as %if dpi_value > 2.8%, it is converted as %if dpi_value > 2 for comparison.
The variable names should not include white space, and the wlan ssid-profile %ssid_name%.
and special characters. The variable names must match regular expression [a-zA-Z0-9_]. If the variables values with are defined, ensure that the variable is surrounded by space. For example,The first character of the variable name must be an alphabet. Numeric values are not accepted.
The values defined for the variable must not include spaces. If quotes are required, they must be included as part of the variable value. For example, if the intended variable name is wlan ssid-profile "emp ssid”, then the recommended format for the syntax is "wlan ssid-profile %ssid_name%” and variable as “ssid_name”: "\"emp ssid\"".
If the configuration text has the percentage sign Aruba Central treats it as a variable when you save the template. To allow the use of percentage as an escape character, use in the variable definition as shown in the following example:
in it—for example, —
wlan external-captive-portal "Splash Profile 1_#guest#_"
server naw1.cloudguest.central.arubanetworks.com
port 443
url %url%
"url": "\"/portal/scope.cust-5001098/Splash%20Profile%201/capture\""
Aruba Central supports adding multiple lines of variables in AP configuration templates. If you want to add multiple lines of variables, you must add the HAS_MULTILINE_VARIABLE directive at the beginning of the template.
#define HAS_MULTILINE_VARIABLE 1
%if allowed_aps%
%allowed_aps%
%endif%
“allowed_aps”: “allowed-ap 24:de:c6:cb:76:4e\n allowed-ap ac:a3:1e:c5:db:d8\n allowed-ap 84:d4:7e:c4:8f:2c"
|
For APs, you can configure a variable file with a set of values defined for a master AP in the network. When the variable file is uploaded, the configuration changes are applied to all AP devices in the cluster. |

The following example shows the contents of a variable file in the JSON format for APs:
{
"CK0036968": {
"_sys_serial": "CK0036968",
"ssid": "s1",
"_sys_lan_mac": "ac:a3:1e:c5:db:7a",
"vc_name": "test_config_CK0036968",
"org": "Uber_org_test",
"vc_dns_ip":"22.22.22.22",
"zonename": "Uber_1",
"uplinkvlan": "0",
"swarmmode": "cluster",
"md5_checksum": "ed8a67a3d1be58261640ca53f8fd3bb8",
"hostname": "Uber_1"
},
"CJ0219729": {
"_sys_serial": "CJ0219729",
"ssid": "s1",
"_sys_lan_mac": "ac:a3:1e:cb:04:92",
"vc_name": "test_config_CK0036968",
"org": "Uber_org_test",
"vc_dns_ip":"22.22.22.22",
"zonename": "Uber_1",
"uplinkvlan": "0",
"swarmmode": "cluster",
"md5_checksum": "ed8a67a3d1be58261640ca53f8fd3bb8",
"hostname": "Uber_2"
},
"CK0112486": {
"_sys_serial": "CK0112486",
"ssid": "s1",
"_sys_lan_mac": "ac:a3:1e:c8:29:76",
"vc_name": "test_config_CK0036968",
"org": "Uber_org_test",
"vc_dns_ip":"22.22.22.22",
"zonename": "Uber_1",
"uplinkvlan": "0",
"swarmmode": "cluster",
"md5_checksum": "ed8a67a3d1be58261640ca53f8fd3bb8",
"hostname": "Uber_3"
},
"CT0779001": {
"_sys_serial": "CT0779001",
"ssid": "s1",
"_sys_lan_mac": "84:d4:7e:c5:c6:b0",
"vc_name": "test_config_CK0036968",
"org": "Uber_org_test",
"vc_dns_ip":"22.22.22.22",
"zonename": "Uber_1",
"uplinkvlan": "0",
"swarmmode": "cluster",
"md5_checksum": "ed8a67a3d1be58261640ca53f8fd3bb8",
"hostname": "Uber_4"
},
"CM0640401": {
"_sys_serial": "CM0640401",
"ssid": "s1",
"_sys_lan_mac": "84:d4:7e:c4:8f:2c",
"vc_name": "test_config_CK0036968",
"org": "Uber_org_test",
"vc_dns_ip":"22.22.22.22",
"zonename": "Uber_1",
"uplinkvlan": "0",
"swarmmode": "cluster",
"md5_checksum": "ed8a67a3d1be58261640ca53f8fd3bb8",
"hostname": "Uber_6"
},
"CK0037015": {
"_sys_serial": "CK0037015",
"ssid": "s1",
"_sys_lan_mac": "ac:a3:1e:c5:db:d8",
"vc_name": "test_config_CK0036968",
"org": "Uber_org_test",
"vc_dns_ip":"22.22.22.22",
"zonename": "Uber_1",
"uplinkvlan": "0",
"swarmmode": "cluster",
"md5_checksum": "ed8a67a3d1be58261640ca53f8fd3bb8",
"hostname": "Uber_7"
},
"CK0324517": {
"_sys_serial": "CK0324517",
"ssid": "s1",
"_sys_lan_mac": "f0:5c:19:c0:71:24",
"vc_name": "test_config_CK0036968",
"org": "Uber_org_test",
"vc_dns_ip":"22.22.22.22",
"zonename": "Uber_1",
"uplinkvlan": "0",
"swarmmode": "cluster",
"md5_checksum": "ed8a67a3d1be58261640ca53f8fd3bb8",
"hostname": "Uber_8"
}
}
Figure 1 shows a sample variables file in the CSV format:
Figure 1 Variables File in the CSV Format

Uploading Variable Files
To upload a variable file, complete the following steps:
1. Ensure that the and variables are defined with the serial number and MAC address of the devices, respectively.
2. In the app, set the filter to one of the template groups under .
3. Under , click > .
4. Click the icon.
5. Click .
6. Click and select the variable file to upload.
7. Click . The contents of the variable file is displayed in the table.
8. To search for a variable, specify a search term and click icon.
9. To download variable file with device-specific definitions, click the download icon in the table.
Modifying Variables
To modify variables without downloading a variable file, modifying the variable file, and uploading the customized variable file:
1. In the app, set the filter to one of the template groups under .
2. Under , click > .
3. Click the icon.
4. Click .
5. Select a device and variable.
6. Modify the value and click .
7. Click .
Alternatively, to modify a single variable without downloading a variable file, modifying the variable file, and uploading the customized variable file:
1. In the app, set the filter to one of the template groups under .
2. Under , click > .
3. Click the icon.
4. Hover over a desired variable and click .
5. Modify the value and click .
6. Click .