Re: [Puppet Users] $title as default value for argument in defintion

2010-03-08 Thread Thomas Bellman
robert.gstoehl wrote: I'd like to provide a definition with an argument which is optional and defaults to the title: net::route_default{"first": gateway => "192.168.0.1"} or the shortcut: net::route_default{"192.168.0.1"} Do it like this: define route_default($gateway="") { i

[Puppet Users] $title as default value for argument in defintion

2010-03-08 Thread robert.gstoehl
Hey there, I'd like to provide a definition with an argument which is optional and defaults to the title: net::route_default{"first": gateway => "192.168.0.1"} or the shortcut: net::route_default{"192.168.0.1"} class net { define route_default($gateway=$title) { exec {"echo $gateway >> /e