Hi everyone,
I use a lot of accessing a variables with
class 'my_clas' (
String $var1,
String $var2,
)
{
$path = "$var1/$var2"
}
After loading my_class
class { 'my_clas':
var1 => 'something',
var2 => 'otherthing',
}
than I access to those variables
$::my_class:var1
$::my_class:path
Is it possible to do the same with define ? For example to do something
like
define my_script (
String $name,
)
{
$script_path = "/opt/local/bin/${name}",
}
then
my_script { 'first':
name => 'my_script'
}
cron { 'first':
command => $my_script::first::script_path
}
my_script { 'second':
name => 'my_script_second'
}
cron { 'second':
command => $my_script::first_second::script_path
}
Regards
--
Albert SHIH
Observatoire de Paris
xmpp:
j...@obspm.fr
Heure local/Local time:
Tue 23 Jun 2020 12:08:05 PM CEST