I''m trying to try out puppet and can''t seem to get to square one. I''ve been using cfengine for years and have just upgraded about 80 Debian machines to etch and wanted to try puppet. So, I have two Debian ''etch'' machines one a server and the other a client. I''m running puppet 0.23.2 installed from the unstable packages. As a first step I''m trying to create a simple module to ensure that the /etc/ntp.conf file is present on the client and has the same contents as the master file on the server. I''m also trying to follow the guidance on the wiki for Module Organization. Server: I''ve created a module directory and files: /etc/puppet/modules/classes/ntp/manifests/init.pp /etc/puppet/modules/classes/ntp/files/ntp.conf /etc/puppet/puppet.conf: [main] logdir=/var/log/puppet vardir=/var/lib/puppet rundir=/var/run ssldir=/var/lib/puppet/ssl [puppetmasterd] templatedir=/var/lib/puppet/templates modulepath=$confdir/modules:/usr/share/puppet/modules /etc/puppet/manifests/site.pp: # import the server classes import "classes/ntp" node default { include ntp } When I start puppetmaster on the server I get the following in the syslog Sep 6 09:25:55 athena puppetmasterd[17030]: Could not parse; using old configuration: No file(s) found for import of ''classes/ntp'' at /etc/puppet/manifests/site.pp:10 Sep 6 09:25:55 athena puppetmasterd[17045]: Reopening log files Sep 6 09:25:55 athena puppetmasterd[17045]: Starting Puppet server version 0.23.2 Similarly when I run puppetd on the client I get: anet22:~# puppetd --server athena.rsc.raytheon.com --verbose notice: Starting Puppet client version 0.23.2 err: Could not retrieve configuration: Cannot connect to server and there is no cached configuration I''m sure I''m doing something really stupid, and I''ve tried a lot of things, but I can''t seem to get over this hump. So any advice would be greatly appreciated.
On Sep 6, 2007, at 11:31 AM, Steve Witt wrote:> I''ve created a module directory and files: > > /etc/puppet/modules/classes/ntp/manifests/init.pp > /etc/puppet/modules/classes/ntp/files/ntp.confWhen organizing your configurations, there are two places where Puppet will look for manifests: The directory that your site.pp file is in (normally something like /etc/puppet/manifests), and the modulepath. When looking in the manifests directory, Puppet will import files relative to the site.pp file. So, if you had /etc/puppet/manifests/ classes/ntp.pp, then Puppet could import that with ''import "classes/ ntp"'' in your site.pp. However, when looking for manifests in your module path, Puppet will take the path you give it, replace the first ''/'' with ''/manifests/'', and look there. So, in the case you''ve provided, Puppet will look in /etc/puppet/modules/classes/manifests/ntp.pp. Try moving everything in the ''classes'' directory into the modules directory itself. So, in this case, you should have /etc/puppet/ modules/ntp, which should contain manifests/init.pp and files/ntp.conf. Make sense? -- The great tragedy of Science - the slaying of a beautiful hypothesis by an ugly fact. --Thomas H. Huxley --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Thu, 6 Sep 2007, Luke Kanies wrote:> Try moving everything in the ''classes'' directory into the modules > directory itself. So, in this case, you should have /etc/puppet/ > modules/ntp, which should contain manifests/init.pp and files/ntp.conf.OK, this worked, thanks.> > Make sense?I''m not sure :), but I''ll build on the above and figure it out. I''m just at that point where I don''t understand it enough to apply the examples in the wiki. Thanks a lot for the quick response.
On Sep 6, 2007, at 3:57 PM, Steve Witt wrote:> I''m not sure :), but I''ll build on the above and figure it out. I''m > just at that point where I don''t understand it enough to apply the > examples in the wiki. Thanks a lot for the quick response.That''s the first time I''ve seen anyone have that problem, but it looks like the docs weren''t clear enough. It''d be great if you could provide some recommendations on how to clarify the documentation, once you understand it. -- Kai''s Example Dilemma: A good analogy is like a diagonal frog. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com