Defined Type: interface::manual

Defined in:
modules/interface/manifests/manual.pp

Overview

Parameters:

  • interface (Any)
  • family (Any) (defaults to: 'inet')


1
2
3
4
5
6
7
8
9
10
11
12
13
# File 'modules/interface/manifests/manual.pp', line 1

define interface::manual($interface, $family='inet') {
    # Use augeas to create a new manually setup interface with allow-hotplug
    $augeas_cmd = [ "set allow-hotplug[./1 = '${interface}']/1 '${interface}'",
            "set iface[. = '${interface}'] '${interface}'",
            "set iface[. = '${interface}']/family '${family}'",
            "set iface[. = '${interface}']/method 'manual'",
    ]

    augeas { "${interface}_manual":
        context => '/files/etc/network/interfaces',
        changes => $augeas_cmd;
    }
}