Defined Type: interface::up_command
- Defined in:
- modules/interface/manifests/up_command.pp
Overview
SPDX-License-Identifier: Apache-2.0
2 3 4 5 6 7 8 9 10 11 |
# File 'modules/interface/manifests/up_command.pp', line 2
define interface::up_command($interface, $command) {
# Use augeas to add an 'up' command to the interface
augeas { "${interface}_${title}":
incl => '/etc/network/interfaces',
lens => 'Interfaces.lns',
context => "/files/etc/network/interfaces/*[. = '${interface}']",
changes => "set up[last()+1] '${command}'",
onlyif => "match up[. = '${command}'] size == 0";
}
}
|