Re: [Puppet Users] Set default param value based on another param

2018-10-07 Thread 'Dan White' via Puppet Users
I like Henrikā€™s solution better than mine. I have been dealing with old versions of Puppet for too long. > On Oct 7, 2018, at 9:47 PM, Jody Des Roches wrote: > > Thank you Dan and Henrik for taking the time to help. > Henrik, your solution is what I am using in concert with common.yaml to add

Re: [Puppet Users] Set default param value based on another param

2018-10-07 Thread Jody Des Roches
Thank you Dan and Henrik for taking the time to help. Henrik, your solution is what I am using in concert with common.yaml to add a default to the base_dir value. Mahalo! -Jody On Sun, Oct 7, 2018 at 5:35 AM Henrik Lindberg wrote: > If you are on a reasonably modern Puppet version you should

Re: [Puppet Users] Set default param value based on another param

2018-10-07 Thread Henrik Lindberg
If you are on a reasonably modern Puppet version you should do it like this: class myclass( String $base_dir, Optional[String] $conf_dir = "${base_dir}/conf" ) { } I tested it as well: class myclass( String $base_dir, Optional[String] $conf_dir = "${base_dir}/conf" ) {