Defined Type: interface::up_command

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

Overview

Parameters:

  • interface (Any)
  • command (Any)


1
2
3
4
5
6
7
8
# File 'modules/interface/manifests/up_command.pp', line 1

define interface::up_command($interface, $command) {
    # Use augeas to add an 'up' command to the interface
    augeas { "${interface}_${title}":
        context => "/files/etc/network/interfaces/*[. = '${interface}']",
        changes => "set up[last()+1] '${command}'",
        onlyif  => "match up[. = '${command}'] size == 0";
    }
}