Skip to content

network-data

A map of ssh public keys to install for the root user

This is a named set of key/value pairs. All data elements are strings. When entering numbers like vlan id or other single number values, these must be quoted as strings.

This allows for the create of a named network with additional information about the network. Known supported keys within a network are:

  • name = the name of the network again (same as key)
  • dhcp = yes/no/true/false as a string. Remember to quote true or false.
  • vlan = VLAN ID number - Remember to quote numbers.
  • mtu = MTU for this network - Remember to quote numbers.
  • gateway = IPv4 Gateway address
  • netmask = IPv4 Netmaks
  • address = IPv4 Address - In some cases, this will NOT be required. DNS lookups...
  • interface = a comma separated list of interfaces to used e.g. eth0,enp0s3 - if needed. The list is for handling naming issues. The first found on the system is used.
  • routes = a list of route objects
  • dns-servers = a list of dns-servers (though generally this is specified with the dns-servers parameter)
  • bond-name = The name of the bond to create.
  • bond-interfaces = A comma separated list of interfaces to add to the bond.
  • bond-miimon = The mii monitor in milliseconds of the bonded interfaces should use.
  • bond-mode = The mode the bonded interfaces should use. This must be the string forms, e.g. 802.3ad
  • bond-lacp-xmit-hash= The LACP XMIT Hash method This must be the string forms, e.g. encap3+4
  • bond-lacp-rate = Should LACP use fast or slow modes
  • bond-mac = The MAC address to set for the bond. THIS SHOULD NOT BE USED WITHOUT DUE CONSIDERATION
  • bond-inteface-macs = A comma seperated list of mac addresses to set on the bond-interfaces. THIS SHOULD NOT BE USED WITHOUT DUE CONSIDERATION
  • debug-network-config = if set to something, sledgehammer will stop to debug initial networking in stage1

Leave the element out if not needed.

The vlan and mtu will be applied on top of the bond, if the bond is specified.

The all network can be used to define things that should apply to all networks. This is meant for dns-servers and routes currently.

For example:

all: # Special non-network to hold global-level things of routes and dns-servers
  routes:
  - network: 20.20.20.0
    gateway: 192.168.2.1
    netmask: 255.255.255.0
    interface: eth1
  dns-servers:
  - 8.8.8.8
  - 8.8.4.4
prov:
  name: prov
  dhcp: yes
  routes:
  - network: 10.10.10.0
    gateway: 192.168.1.1
    netmask: 255.255.255.0
    interface: eth0
prod:
  name: prod
  dhcp: no
  gateway: 10.2.3.1
  netmask: 255.255.255.0
  address: 10.2.3.15
stor:
  name: stor
  dhcp: no
  gateway: 10.3.3.1
  netmask: 255.255.255.0
  address: 10.3.3.15
  vlan: "2335"
  interface: "eth0,enp0s3"