[
https://issues.apache.org/jira/browse/BIGTOP-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177511#comment-13177511
]
Roman Shaposhnik commented on BIGTOP-317:
-----------------------------------------
Sorry for the noise, but I can't seem to make flexible renames work with
Puppet. I need to 'phone a friend' at this point ;-)
Here's what I wanted to have:
class hadoop-zookeeper {
$client_name = "zookeeper"
define client {
package { $client_name:
ensure => latest,
}
}
....
that does NOT really work in puppet since apparently referencing variables
defined in the class works ONLY if the class itself has been included like this:
include hadoop-zookeeper
Obviously, we can't include ourselves, but we can include a class that is
defined inside of us. Which bring me to the following ugly code:
class hadoop-zookeeper {
class zookeeper {
$client_name
}
define client {
include zookeeper
package { $zookeeper::client_name:
ensure => latest,
}
}
Any suggestions on how to solve it better?
> rename hadoop-zookeeper package into zookeeper
> ----------------------------------------------
>
> Key: BIGTOP-317
> URL: https://issues.apache.org/jira/browse/BIGTOP-317
> Project: Bigtop
> Issue Type: Sub-task
> Components: General
> Affects Versions: 0.2.0
> Reporter: Roman Shaposhnik
> Assignee: Roman Shaposhnik
> Fix For: 0.3.0
>
> Attachments: BIGTOP-317.patch.txt
>
>
> While doing so I'll also try to make the naming as flexible as possible by
> keeying everything off of a couple of top-level variables.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira