I was playing around with scopes, and I noticed the following
behaviour, which strikes me as odd? This was done with Puppet
Enterprise 2.5.3 which is really Puppet 2.7.12.
I'm not sure what I would expect, quite likely an error message or at
the very least 'mysql-server' package gettign installed. Instead, it
just seems to choose the top-scope variable 'mysql'
$package = 'mysql'
class mysql {
package { $mysql_server::package:
ensure => present
}
}
class mysql_server {
include mysql
$package = 'mysql-server'
}
include mysql_server
This yields:
[root@master test]# puppet apply manifests/init.pp
notice: /Stage[main]/Mysql/Package[mysql]/ensure: created
notice: Finished catalog run in 6.25 seconds
cheers,
--
Walter Heck
CEO and Founder @ OlinData (
http://olindata.com)
Puppet training and consulting
--
Follow @olindata on Twitter and/or 'Like' our Facebook page at
http://www.facebook.com/olindata