OS templates simple asset template variables glossary (DEPRECATED)

The following variables are available to be used in “text” type OS Template assets.

Note that since version 6.1 this template language is DEPRECATED in favour of the Jinjia2/Nunjucks-based templates which supports iterations, conditionals etc. This format is still supported but will be removed in a future release.

Infrastructure variables

  1. {{infrastructure_id}} - The numeric ID of the variable such as 1234.

  2. {{infrastructure_label}} - The text label of the infrastructure. (Letters,numbers,dashes, no spaces)

  3. {{infrastructure_subdomain_permanent}} - The unqiue DNS record associated with this infrastructure. Does not resolve to an IP. Example test123.7.metalsoft.io

Pre-deploy stage variables

  1. {{will_be_removed_instance_hostnames}} - Will be replaced with the instance hostnames that will be deleted from an infrastructure. Comma , separated arrays of instance_subdomain_permanent such as: instance-12312.metalsoft.io.

  2. {{will_be_added_instance_hostnames}} - Will be replaced with the instances that are new . Comma , separated arrays of instance_subdomain_permanent such as: instance-12312.metalsoft.io.

  3. {{will_be_active_instance_hostnames}} - Will be replaced with the instances that will become active. Comma , separated arrays of instance_subdomain_permanent such as: instance-12312.metalsoft.io.

Post-deploy stage variables

  1. {{removed_instance_hostnames}} - Will be replaced with the instances that have been removed during the deploy. Comma , separated arrays of instance_subdomain_permanent such as: instance-12312.metalsoft.io.

  2. {{added_instance_hostnames}} - Will be replaced with the instances that have been added during the deploy. Comma , separated arrays of instance_subdomain_permanent such as: instance-12312.metalsoft.io.

Instance Array variables

  1. {{instance_array_id}} - The numeric ID of the instance array such as 1234

  2. {{instance_array_label}} - The label of the instance array such as controller

  3. {{instance_array_subdomain_permanent}} - The DNS record associated with this instance array. This maps to all of the instances in that instance array. Example instance-56008.metalsoft.io.

  4. {{<instance-array-label>_ipv4_address_<instance-id>_<ip-index>}} - The WAN IP address if the respective instance in the array. Example variable: {{my_instance_array_ipv4_address_0_0} will be replaced by 192.168.0.1

  5. {{<instance-array-label>_ipv4_mask_<instance-id>_<ip-index>}} - The netmask of the respective instance in the array. Example: 255.255.255.0

  6. {{<instance-array-label>_ipv4_cidr_<instance-id>_<ip-index>}} - The CIDR format notation of the netmask: Example 27 for a /27 IP address representing that the IP could be written in the form 192.168.0.1/27.

Instance variables

  1. {{instance_id}} - The numeric ID of the instance such as 56008

  2. {{instance_label}} - The label of the instance such as instance-56008

  3. {{instance_subdomain_permanent}} - The DNS record of the instance’s WAN IPv4 address. Example instance-56008.metalsoft.io.

  4. {{server_disk_size_mbytes}} - The disk size in Mbytes. This can be used to skip disks that are not designed to be used for local install.

  5. {{initial_user}} - The value of the initial user property configured on the template.

  6. {{initial_password}} - The value of the initial_password property configured (or automatically generated) on the template.

  7. {{<interface_type>_interface_<0 ,1, ...>_mac_address}} - The MAC address of the specified interface. There can be more than one if the interfaces are part of a bond. For example the variable {{wan_interface_0_mac_address}} will be replaced with ee:59:f9:9c:08:05. Interface type can be one of wan,lan,san.

  8. {{<interface_type>_interface_<0 ,1, ...>_mac_address_dashed}} - The MAC address of the specified interface. There can be more than one if the interfaces are part of a bond. For example the variable {{wan_interface_0_mac_address}} will be replaced with ee-59-f9-9c-08-05. Interface type can be one of wan,lan,san. Useful for Windows installations.

  9. {{<interface_type>_interface_<0, 1, ...>_ipv4_ip_<0, 1, .., n>_address}} - The nth IP address of the specified interface. An interface can have multiple IPs. Each IP can be selected by changing the second number. Example {{wan_interface_0_ipv4_ip_1_address}} will be replaced with 192.168.0.1, which is the second IP (index 1 counting from 0) of the first WAN interface. Interface type can be one of wan,lan,san.

  10. {{<interface_type>_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_gateway}} - The gateway of the specified IP of the specified interface. Example {{wan_interface_0_ipv4_ip_1_gateway}} will be replaced with 192.168.0.254. Interface type can be one of wan,lan,san.

  11. {{<interface_type>_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_mask}} - The netmask of the specified IP of the specified interface. Example {{wan_interface_0_ipv4_ip_1_mask}} will be replaced with 255.255.255.0, which is the netmask of the second IP (index 1 counting from 0) of the first WAN interface. Interface type can be one of wan,lan,san.

  12. {{<interface_type>_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_cidr}} - The CIDR notation suffix of the specified IP of the specified interface. Example {{wan_interface_0_ipv4_ip_1_cidr}} will be replaced with 192.168.0.1/27. Interface type can be one of wan,lan,san.

  13. {{<interface_type>_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_network_address}} - The network address of the specified IP of the specified interface. Example {{wan_interface_0_ipv4_ip_1_network_address}} will be replaced with 192.168.0.0. Interface type can be one of wan,lan,san.

  14. {{<interface_type>_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_prefix_size}} - The prefix size of the specified IP of the specified interface. Example {{wan_interface_0_ipv4_ip_1_prefix_size}} will be replaced with 27. Interface type can be one of wan,lan,san.

  15. {{<interface_type>_interface_<0, 1, ...>_ipv4_ip_count}} - The count of IP ipv4 addresses. Interface type can be one of wan,lan,san.

  16. {{<interface_type>_interface_count}} - The count of interfaces added in the network. Useful when determining if a bond is needed.

  17. {{wan_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_vlan_id}} - The VLAN that holds the gateway for the requested IP. Can either be native, if the default allocated VLAN is used, or be a number such as 600 if the override VLAN functionality of the Instance Array is used. Example {{wan_interface_0_ipv4_ip_1_gateway}} will be replaced with 600 if the VLAN override is specified or with native if not. If it’s 600, it means that the gateway of the second IP of the first WAN interface is provisioned on the SVI of the VLAN 600 on the switch. If it’s native, it means the gateway is provisioned on the VLAN that was assigned by default for the infrastructure (e.g. VLAN 100).

  18. {{wan_interface_<0, 1, ...>_ipv4_ip_count}} - count of ips allocated to the interface

  19. {{<wan_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_subnet_pool_cidr}} - The subnet pool from which the subnet of the requested IP was allocated. Example {{wan_interface_0_ipv4_ip_1_subnet_pool_cidr}} will be replaced with 10.0.0.0/8, while the subnet may be 10.0.1.0/24 and the second IP 10.0.1.2 (the second IP of the first WAN interface).

  20. {{<wan_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_subnet_pool_network_address}} - The network address of subnet pool from which the subnet of the requested IP was allocated. Example {{wan_interface_0_ipv4_ip_1_subnet_pool_network_address}} will be replaced with 10.0.0.0.

  21. {{<wan_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_subnet_pool_prefix_size}} - The prefix size of subnet pool from which the subnet of the requested IP was allocated. Example {{wan_interface_0_ipv4_ip_1_subnet_pool_prefix_size}} will be replaced with 8.

  22. {{management_ssh_key}} - The management ssh keys. They are unique to each instance.

  23. {{iscsi_initiator_iqn}} - ISCSI initiator IQN

  24. {{iscsi_chap_username}} - ISCSI Username

  25. {{iscsi_chap_password}} - ISCSI Password

IPv6 Variables

All of the above have an IPv6 equivalent such as:

  1. {{san_interface_0_ipv6_ip_0_address}} - ipv6 SAN network address

  2. {{san_interface_0_ipv6_ip_0_gateway}} - ipv6 SAN network gateway

  3. {{san_interface_0_ipv6_ip_0_prefix_size}} - ipv6 SAN network prefix size

Drive Array variables

  1. {{iscsi_drive_<drive_index>_storage_ip_address_<target_index>}} - ISCSI Target’s IP

  2. {{iscsi_drive_<drive_index>_storage_port_<target_index>}} - ISCSI Target port

  3. {{iscsi_drive_<drive_index>_target_iqn_<target_index>}} - ISCSI Target IQN

  4. {{iscsi_drive_<drive_index>_lun_id}} - ISCSI drive LUN ID

  5. {{iscsi_drive_<drive_index>_lun_id_hex}} - ISCSI drive LUN ID in hexadecimal format

  6. {{iscsi_drive_<drive_index>_wwn}} - ISCSI drive’s WWN number returned by the storage. Example: 60:06:01:60:B2:44:08:2B:52:EC:A2:62:ED:91:9E:9C.

Deprecated drive array iSCSI options

  1. {{iscsi_drive_target_<drive_index>}} - ISCSI Target IP address.

  2. {{iscsi_drive_target_iqn_<drive_index>}} - ISCSI Target’s IQN

  3. {{iscsi_drive_port_<drive_index>}} - ISCSI Target port

Shared Drives

  1. {{iscsi_shared_drive_target_<drive_index>}} - ISCSI Target IP

  2. {{iscsi_shared_drive_port_<drive_index>}} - ISCSI Target port

  3. {{iscsi_shared_drive_lun_id_<drive_index>}} - ISCSI LUN ID

  4. {{iscsi_shared_drive_target_iqn_<drive_index>}} - ISCSI Target IQN

  5. {{iscsi_shared_drive_<drive_index>_target_iqn_<target_index>}} - ISCSI Target IQN

  6. {{iscsi_shared_drive_<drive_index>_storage_port_<target_index>}} - ISCSI Target Port

  7. {{iscsi_shared_drive_<drive_index>_storage_ip_address_<target_index>}} - ISCSI Portal IP Address

  8. {{iscsi_shared_drive_<drive_index>_wwn}} - ISCSI drive’s WWN number as returned by the storage. Example: 60:06:01:60:B2:44:08:2B:52:EC:A2:62:ED:91:9E:9C.

SNMP variables

  1. {{snmp_port}}

  2. {{snmp_security_name}}

  3. {{snmp_security_level}}

  4. {{snmp_authentication_protocol}}

  5. {{snmp_authentication_passphrase}}

  6. {{snmp_privacy_protocol}}

  7. {{snmp_privacy_passphrase}}

  8. {{snmp_community_password}}

  9. {{snmp_version}}

Datacenter variables

  1. {{HTTP_SERVER_ENDPOINT}} - Populated with the datacenter agent’s http url such as http://172.168.1.1/tftp8069. It will not include a DNS record to make it available in case DNS is not available.

  2. {{dns_server_ip_0}} - The first DNS server to be used.

  3. {{dns_server_ip_1}} - The second DNS server to be used.

  4. {{ntp_server_ip_0}} - The first NTP server to be used.

  5. {{ntp_server_ip_1}} - The second NTP server to be used.

  6. {{repo_url_root}} - The repository URL base url.

  7. {{datacenter_samba_server_hostname}} - The repository’s samba (SMB) hostname.

  8. {{datacenter_samba_server_ip}} - The repository’s samba (SMB) IP address.

  9. {{datacenter_samba_server_username}} - The repository’s samba (SMB) username.

  10. {{datacenter_samba_server_password}} - The repository’s samba (SMB) password.

  11. {{datacenter_kms}} - The Windows KMS server hostname.

  12. {{proxy_url}} - (Optional) Proxy URL configured on the datacenter.

  13. {{proxy_username}} - (Optional) Username used for accessing the above proxy.

  14. {{proxy_password}} - (Optional) Password used for accessing the above proxy.

Quarantine variables

The quarantine IPs are only used during provisioning on legacy (PXE-based) deployments

  1. {{quarantine_interface_<interface-index>_ipv4_ip_<ip-index>_address}} - IP allocated on the interface.

  2. {{quarantine_interface_<interface-index>_ipv4_ip_<ip-index>_gateway}} - Gateway of IP allocated on the interface. (might be null)

  3. {{quarantine_interface_<interface-index>_ipv4_ip_<ip-index>_mask}} - Netmask of IP.

  4. {{quarantine_interface_<interface-index>_mac_address}} - MAC address of the interface in the quarantine network. Example 3e:22:fb:87:d2:65

  5. {{quarantine_interface_<interface-index>_mac_address_dashed}} - MAC address of the interface in the quarantine network in dash format. Example 3e-22-fb-87-d2-65

  6. {{quarantine_interface_<interface-index>_cidr}} - Complete network prefix in CIDR notation such as 10.0.1.0/24.

  7. {{dns_server_quarantine_ip_<index>}} - DNS server to use in the quarantine network to reach the internet or some other network.

General purpose variables

  1. {{user_ssh_key_<0,1,2,..>}} - Gets populated with the public SSH keys configured by the user.