Skip to content

Device Group

Device groups provide a powerful mechanism for applying consistent configurations across multiple devices. They sit in the middle of the configuration hierarchy (Global → Device Group → Device), allowing you to define common settings that can be inherited by member devices while still permitting device-specific overrides.

Device groups are particularly effective for:

  • Role-based configuration: Grouping devices by function (access switches, core routers, etc.)
  • Location-based configuration: Applying site-specific settings to devices in the same location
  • Service deployment: Rolling out consistent service configurations across multiple devices
  • Staged rollouts: Gradually applying configuration changes to device subsets

Device membership can be defined in two ways:

  • From the device: Devices can specify which groups they belong to via the device_groups attribute
  • From the group: Groups can specify their member devices via the devices attribute

Device groups support variables, configuration templates, and full device configurations, providing flexibility in how you structure and deploy your network policies.

Diagram

Diagram

Classes

device_groups (iosxe)

NameTypeConstraintMandatoryDefault Value
nameStringYes
versionStringNo
devicesListStringNo
variablesMapNo
configuration_templatesListStringNo

Examples

iosxe:
device_groups:
# Basic group with member devices defined in group
- name: ACCESS_SWITCHES
devices:
- Access-SW-01
- Access-SW-02
- Access-SW-03
configuration:
spanning_tree:
mode: rapid-pvst
portfast_default: true
# Group with variables and configuration templates
- name: CORE_SWITCHES
variables:
ospf_area: "0.0.0.0"
vlan_range: "1-100"
configuration_templates: [ospf_core]
configuration:
system:
ip_routing: true
spanning_tree:
mode: mst
# Location-based group
- name: BUILDING_A_DEVICES
devices: [Core-SW-A1, Access-SW-A1, Access-SW-A2]
variables:
location: "Building A"
mgmt_vlan: 100
dns_server: "192.168.100.10"
configuration:
system:
ip_name_servers: ["${dns_server}"]
ntp:
servers:
- ip: "192.168.100.1"
# Alternative: Define group membership from devices
devices:
- name: Edge-SW-01
url: https://10.1.1.20
device_groups:
- ACCESS_SWITCHES
- EDGE_DEVICES