Hi All,
I have a puppet class which accepts parameter "$version" for a software package.
The problem is when i do puppet agent -t , it is installing the software package though the same version is present already. All works fine if i remove the parameter to a class and hard code the version.
Below is my code for with and without parameter to a class
With Parameter:(DOES NOT SKIP installation- PROBLEMATIC)
class ctf ($version) {
$ctfdest = sprintf('C:\PuppetSWT\CTF-%s.exe', $version)
ensure => 'installed',
source => $ctfdest,
install_options => [ '/S' ],
}
Without Parameter: (SKIPS installation when i run second time- EXPECTED)
class ctf_v_1_3_8 {
$ctfdest = 'C:\PuppetSWT\CTF-1.3.8.exe'
ensure => 'installed',
source => $ctfdest,
install_options => [ '/S' ],
}
This is going to be major problem as i dont want to end up in creating multiple classes for different versions , can someone help to understand why this different behavior and solution.?
Thanks a lot.