A lot of what you're asking comes down to convention more than strict language requirements... The language is flexible enough to do things a number of different ways.
If all the servers are being configured the same, it should work fine to have a single "gigaspace" class with the variables set at the top.
If your needs are more complicated than a single class of server, what I would do is create a "gigaspace" module with a common class holding variables inherited by classes needing the variables. In gigaspace/manifests there'd be an "init.pp" containing "class gigaspace {...}
", and then a "common.pp" containing "class gigaspace::common {...}
". Then in any class that I needed access to those variables, I would inherit from the common class, like "class gigaspace::master inherits gigaspace::common { ... }
".
If you don't inherit from the other class, it's a pain to get at variables in another class, especially from within a template. With a straight include you can get read-only access via specifying the whole name, however.