sses, that way autoloading works ok and the classes are found, but that seems a bit awkward. <br></div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>Note that it's a bit redundant to name your classes that way -- you<br> can just as easily use 'ntp::server'.</blockquote><div><br>Thanks for the suggestion, those classes came from a place where adding ntp_ in front of their name made sense.<br> <br></div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br><div class=3D"Ih2E3d"><br>> 2. If I include ntp everything works as expected, and the<br>> ntp_localtime is used correctly. However if I include<br>> ntp:ntp_server the template doesn't seem to be able to find the <br>> ntp_server variable (Failed to parse template ntp/etc/<br>> ntp.conf.server: Could not find value for 'ntp_server' at /etc/<br>> puppet/modules/ntp/manifests/init.pp:66). This works if I define<br>> the variable inside the node. Again, what am I doing wrong here? <br><br></div>There's an ordering issue when autoloading, and it's somewhat<br>intractable -- Puppet evaluates all code outside of any class before<br>it evaluates any other classes. This works fine when you use<br> 'import', because all files are imported before any code is evaluated.<br><br>However, when you use autoloading, some files are only imported while<br>parsing, which means that some code -- and particularly, all the code <br>outside of classes and definitions -- has already been evaluated.<br>Puppet makes no attempt to catch this code and evaluate it for you.<br><br>If you have code outside of classes or definitions in your modules,<br>you must explicitly import them, rather than relying on autoloading. <br></blockquote></div><br>So summing up, you must:<br>1. Add the namespace manually to all the classes (or whatever) defined in a module if you want to use autoloading. This means that you cannot change the name of a module just changing the name of the directory where it is placed under $modules. <br>2. If you define any variable (or code) outside classes, manually import the module in order to make it work properly. In my case these variables are used to provide default values for some parameters of the classes, is there any best practice regarding this? <br><br>Best regards<br>Jose<br> ------=_Part_5763_3307073.1195597772526--