I am trying to use variables in my modules manifest.pp with little luck
class mysoftware($version="dev-2011.02.04b") {
File {
links => follow
}
file { "/opt/mysoftware":
ensure => directory
}
file { "/opt/mysoftware/share":
source => "puppet://puppet/mysoftware/air/$version",
recurse => "true",
}
}
This does not seem to be working when I assign this to a node via the nodes.pp file.
I am running puppetmaster 2.6.4 puppetd clients are 0.25
I believe that you need to reference it like this:
Here's how I use something similar:
Which I reference from manifests/nodes.pp. I actually don't need to do it that way but set it up and tested it on your behalf (my other examples would have been much longer). Works like a charm.
Are you using 2.6 or older? Parameterized classes are new in 2.6, so if you're using an older version, this should not work.