Add $order parameter (fixes issue #2)
This allows to pass an $order parameter to all definitions.
If the $order parameter is not explicitely defined, it is automatically
choosen such thath the configuration for the 'lo' interfaces comes first.
1 parent 84f8370 commit 46281d77aa7093b880d2a0f97528f4feaaf39823
@Andreas Jaggi Andreas Jaggi authored on 27 Jul 2014
Showing 4 changed files
View
12
manifests/allow.pp
define interfaces::allow ( $subsystem ) {
define interfaces::allow ( $subsystem, $order='UNSET' ) {
$order_real = $order ? {
'UNSET' => 02,
default => $order,
}
concat::fragment{"interfaces::allow-${subsystem}_${name}":
target => '/etc/network/interfaces',
content => "allow-${subsystem} ${name}\n\n",
order => $order_real,
}
}
View
17
manifests/auto.pp
define interfaces::auto ( ) {
define interfaces::auto ( $order='UNSET' ) {
$order_real = $order ? {
'UNSET' => $name ? {
'lo' => 06,
default => 07,
},
default => $order
}
concat::fragment{"interfaces::auto_${name}":
target => '/etc/network/interfaces',
content => "auto ${name}\n\n",
order => $order_real,
}
}
View
manifests/iface.pp
View
manifests/mapping.pp