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¶
{{infrastructure_id}}
- The numeric ID of the variable such as1234
.{{infrastructure_label}}
- The text label of the infrastructure. (Letters,numbers,dashes, no spaces){{infrastructure_subdomain_permanent}}
- The unqiue DNS record associated with this infrastructure. Does not resolve to an IP. Exampletest123.7.metalsoft.io
Pre-deploy stage variables¶
{{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
.{{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
.{{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¶
{{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
.{{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¶
{{instance_array_id}}
- The numeric ID of the instance array such as1234
{{instance_array_label}}
- The label of the instance array such ascontroller
{{instance_array_subdomain_permanent}}
- The DNS record associated with this instance array. This maps to all of the instances in that instance array. Exampleinstance-56008.metalsoft.io
.{{<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 by192.168.0.1
{{<instance-array-label>_ipv4_mask_<instance-id>_<ip-index>}}
- The netmask of the respective instance in the array. Example:255.255.255.0
{{<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 form192.168.0.1/27
.
Instance variables¶
{{instance_id}}
- The numeric ID of the instance such as56008
{{instance_label}}
- The label of the instance such asinstance-56008
{{instance_subdomain_permanent}}
- The DNS record of the instance’s WAN IPv4 address. Exampleinstance-56008.metalsoft.io
.{{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.{{initial_user}}
- The value of theinitial user
property configured on the template.{{initial_password}}
- The value of theinitial_password
property configured (or automatically generated) on the template.{{<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 withee:59:f9:9c:08:05
. Interface type can be one ofwan
,lan
,san
.{{<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 withee-59-f9-9c-08-05
. Interface type can be one ofwan
,lan
,san
. Useful for Windows installations.{{<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 with192.168.0.1
, which is the second IP (index 1 counting from 0) of the first WAN interface. Interface type can be one ofwan
,lan
,san
.{{<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 with192.168.0.254
. Interface type can be one ofwan
,lan
,san
.{{<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 with255.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 ofwan
,lan
,san
.{{<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 with192.168.0.1/27
. Interface type can be one ofwan
,lan
,san
.{{<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 with192.168.0.0
. Interface type can be one ofwan
,lan
,san
.{{<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 with27
. Interface type can be one ofwan
,lan
,san
.{{<interface_type>_interface_<0, 1, ...>_ipv4_ip_count}}
- The count of IP ipv4 addresses. Interface type can be one ofwan
,lan
,san
.{{<interface_type>_interface_count}}
- The count of interfaces added in the network. Useful when determining if a bond is needed.{{wan_interface_<0, 1, ...>_ipv4_ip_<0, 1, ..>_vlan_id}}
- The VLAN that holds the gateway for the requested IP. Can either benative
, if the default allocated VLAN is used, or be a number such as600
if the override VLAN functionality of the Instance Array is used. Example{{wan_interface_0_ipv4_ip_1_gateway}}
will be replaced with600
if the VLAN override is specified or withnative
if not. If it’s600
, 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. VLAN100
).{{wan_interface_<0, 1, ...>_ipv4_ip_count}}
- count of ips allocated to the interface{{<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 with10.0.0.0/8
, while the subnet may be10.0.1.0/24
and the second IP10.0.1.2
(the second IP of the first WAN interface).{{<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 with10.0.0.0
.{{<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 with8
.{{management_ssh_key}}
- The management ssh keys. They are unique to each instance.{{iscsi_initiator_iqn}}
- ISCSI initiator IQN{{iscsi_chap_username}}
- ISCSI Username{{iscsi_chap_password}}
- ISCSI Password
IPv6 Variables¶
All of the above have an IPv6 equivalent such as:
{{san_interface_0_ipv6_ip_0_address}}
- ipv6 SAN network address{{san_interface_0_ipv6_ip_0_gateway}}
- ipv6 SAN network gateway{{san_interface_0_ipv6_ip_0_prefix_size}}
- ipv6 SAN network prefix size
Drive Array variables¶
{{iscsi_drive_<drive_index>_storage_ip_address_<target_index>}}
- ISCSI Target’s IP{{iscsi_drive_<drive_index>_storage_port_<target_index>}}
- ISCSI Target port{{iscsi_drive_<drive_index>_target_iqn_<target_index>}}
- ISCSI Target IQN{{iscsi_drive_<drive_index>_lun_id}}
- ISCSI drive LUN ID{{iscsi_drive_<drive_index>_lun_id_hex}}
- ISCSI drive LUN ID in hexadecimal format{{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¶
{{iscsi_drive_target_<drive_index>}}
- ISCSI Target IP address.{{iscsi_drive_target_iqn_<drive_index>}}
- ISCSI Target’s IQN{{iscsi_drive_port_<drive_index>}}
- ISCSI Target port
SNMP variables¶
{{snmp_port}}
{{snmp_security_name}}
{{snmp_security_level}}
{{snmp_authentication_protocol}}
{{snmp_authentication_passphrase}}
{{snmp_privacy_protocol}}
{{snmp_privacy_passphrase}}
{{snmp_community_password}}
{{snmp_version}}
Datacenter variables¶
{{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.{{dns_server_ip_0}}
- The first DNS server to be used.{{dns_server_ip_1}}
- The second DNS server to be used.{{ntp_server_ip_0}}
- The first NTP server to be used.{{ntp_server_ip_1}}
- The second NTP server to be used.{{repo_url_root}}
- The repository URL base url.{{datacenter_samba_server_hostname}}
- The repository’s samba (SMB) hostname.{{datacenter_samba_server_ip}}
- The repository’s samba (SMB) IP address.{{datacenter_samba_server_username}}
- The repository’s samba (SMB) username.{{datacenter_samba_server_password}}
- The repository’s samba (SMB) password.{{datacenter_kms}}
- The Windows KMS server hostname.{{proxy_url}}
- (Optional) Proxy URL configured on the datacenter.{{proxy_username}}
- (Optional) Username used for accessing the above proxy.{{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
{{quarantine_interface_<interface-index>_ipv4_ip_<ip-index>_address}}
- IP allocated on the interface.{{quarantine_interface_<interface-index>_ipv4_ip_<ip-index>_gateway}}
- Gateway of IP allocated on the interface. (might be null){{quarantine_interface_<interface-index>_ipv4_ip_<ip-index>_mask}}
- Netmask of IP.{{quarantine_interface_<interface-index>_mac_address}}
- MAC address of the interface in the quarantine network. Example3e:22:fb:87:d2:65
{{quarantine_interface_<interface-index>_mac_address_dashed}}
- MAC address of the interface in the quarantine network in dash format. Example3e-22-fb-87-d2-65
{{quarantine_interface_<interface-index>_cidr}}
- Complete network prefix in CIDR notation such as10.0.1.0/24
.{{dns_server_quarantine_ip_<index>}}
- DNS server to use in the quarantine network to reach the internet or some other network.
General purpose variables¶
{{user_ssh_key_<0,1,2,..>}}
- Gets populated with the public SSH keys configured by the user.