Data Models: Host Variables
Let's learn about some of the host variables used in the code configurations.
We'll cover the following
Host variables
Information that is unique to a specific device should be modeled in the host variable for that device.
Follow the same standards, if possible, as group_vars
. Have a host_defaults
section along with all the
other applicable data dictionaries such as host_vrfs
, host_vlans
, host_interfaces
, and
host_port
_channels. Looking at the data model for one of the distribution layer switches, DIST01
, a
partial configuration is started for DIST01
from the coverage provided by the [CAMPUS-DISTRIBUTION]
group_vars
data model. Now, complete the unique configurations specific to DIST01
using host_vars
.
The intent is to uniquely identify the device on the network, configure the following features and options according to corporate standards, and act as a functional building distribution switch in a specific location on the campus. All multicast, vrfs, vrf list, OSPF routing, VLANs, SVIs, STP root, port-channels, and the physical interfaces on the device must be coded in the data model.
DIST01
Let’s take a look at the host variable DIST01.YML
file:
Get hands-on with 1400+ tech skills courses.