> Thanks Chris, that's helpful. I am wondering if I should be mixing > Ruby DSL manifests with the Puppet DSL manifests. Is there any > recommended practice for keeping both styles together?
Afaik you can mix both DSL. If one file in a module ends with .rb it's ruby dsl, if it ends with .pp it's puppet dsl. Obviously they shouldn't have the same name. But if you only use modules and follow the autoloading rules (one define/class per file with the same name as the filename/heirarchy) you won't name a file twice with the same name anyway. > Also, does Ruby > DSL get converted into Puppet DSL before execution? Both, puppet and ruby DSL get compiled as a catalog, which is then sent to the client and applied there. The same goes for the standalone mode, where the client just applies the catalog it compiled before. So in both ways they end up in the same abstract target, called catalog. If you're switchting to client/server mode, the only thing that you need to consider is that ruby-dsl files (as the puppet dsl files) are parsed and compiled on the master. This means that if you have in these ruby-dsl files any file-operations, binary executions etc. without using the proper puppet providers, your ruby code will be executed on the master. As it goes with puppet functions, that are also executed on the master at compile time. So having the idea of querying DBs FROM the client while applying the catalog (not to mix with compiling the catalog) or do any other magic using ruby code, won't work, as this code will always be executed on the master. The client just gets a fixed compiled catalog it applies, nothing else. ~pete
signature.asc
Description: OpenPGP digital signature