Puppet Class: netdev_interfaces

Defined in:
manifests/netdev_interfaces.pp

Overview

Class: device_hiera::netdev_interfaces

Utilize Hiera data to simplify NetDev netdev_interface configuration.

Parameters

None yet.

Variables

Here you should define a list of variables that this module would require.

  • $defaults This contains a hash of default netdev_interface configuration values gathered from Hiera data merge.

  • $ports This contains a hash with String keys named for slot names, and String values containing a range of port numbers.

  • $custom This contains a hash with String keys for netdev_interface names that receive custom configuration. Values are another hash of configuration settings.

Examples

Examples:

Hiera configuration for device_hiera::netdev_interfaces


classes:
- device_hiera

device_hiera::resources:
- netdev_interfaces

device_hiera::defaults::netdev_interface:
  family: 'inet'
  unit  : '0'
  duplex: 'full'
  enable: 'true'
  mtu   : '1500'

device_hiera::netdev_interfaces::ports:
  - 'ge-1/0/': '1-8'
  - 'ge-2/0/': '1-48'

device_hiera::netdev_interfaces::custom:
  'ge-4/0/1':
    description: 'Uplink to core'
    address    : '192.168.51.254'
    speed      : '1g'