Hi, I''m starting to move over to Modules, which looks pretty clean and solid. Reading http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation, one thing that confuses me is how the client resolves the implicit file server resources. I''ve got a few different puppet master servers running on different ports, and my configuration re-defines $puppet_master_host and $puppet_master_port globals depending on which master the client is connecting to. This allows me to "dynamically" change the file server for testing and other things. With Modules, the Wiki says I should write a module manifest similar to: file { "/etc/auto.homes": source => "puppet://$server/autofs/auto.homes" } But I''m not sure what $server explicitly means in the case of modules. Is it a fully qualified hostname and port? IP address? Where does the value of $server come from? Thanks, -- Jeff McCune The Ohio State University Department of Mathematics Systems Manager _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 25 June 2007, Jeff McCune wrote:> Hi, > > I'm starting to move over to Modules, which looks pretty clean and solid. > > Reading http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation, > one thing that confuses me is how the client resolves the implicit file > server resources. > > I've got a few different puppet master servers running on different > ports, and my configuration re-defines $puppet_master_host and > $puppet_master_port globals depending on which master the client is > connecting to. This allows me to "dynamically" change the file server > for testing and other things. > > With Modules, the Wiki says I should write a module manifest similar to: > > file { "/etc/auto.homes": > source => "puppet://$server/autofs/auto.homes" > } > > But I'm not sure what $server explicitly means in the case of modules. > Is it a fully qualified hostname and port? IP address? Where does the > value of $server come from?I'm currently using $servername under the assumption that this contains the server where the configuration came from. Regards, David - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGf85S/Pp1N6Uzh0URApeyAJ9vRUhbogwo4WGMaNTuT4ReZv+JHACcCGXh 4JPLS0HHB1WSNJO+Bo+QrhY=eedA -----END PGP SIGNATURE----- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Mon, 2007-06-25 at 09:11 -0400, Jeff McCune wrote:> I''ve got a few different puppet master servers running on different > ports, and my configuration re-defines $puppet_master_host and > $puppet_master_port globals depending on which master the client is > connecting to. This allows me to "dynamically" change the file server > for testing and other things.In that case, you should write URL''s as ''puppet://$puppet_master_host: $puppet_master_port/path'' and make sure that all your puppetmasters have their modulepath configs point to the same dir. The module system doesn''t do much magic with the server part of URL''s: when the server is given explicitly, the client just connects to the fileserver on that host. The module-specific bit changes how the path part of the URL is used to find a local file for that path.> With Modules, the Wiki says I should write a module manifest similar to: > > file { "/etc/auto.homes": > source => "puppet://$server/autofs/auto.homes" > } > > But I''m not sure what $server explicitly means in the case of modules. > Is it a fully qualified hostname and port? IP address? Where does the > value of $server come from?That was a typo in the example (fixed now): should have been $servername. Puppet sets that variable to the name of the puppetmaster, i.e. ''puppet'' by default. You can also use URL''s without an explicit server name ("puppet:///path") - for those, puppetd will always talk to the fileserver on the default puppetmaster (the one it gets the manifest from), i.e. for puppet such URL''s are equivalent to "puppet://$servername/path"; OTOH, puppet will look such files up in the local file system by searching the module path. That makes it possible to use the same module with puppet and puppetd without any changes. David
David Lutterkort wrote:> You can also use URL''s without an explicit server name > ("puppet:///path") - for those, puppetd will always talk to the > fileserver on the default puppetmaster (the one it gets the manifest > from), i.e. for puppet such URL''s are equivalent to > "puppet://$servername/path"; OTOH, puppet will look such files up in the > local file system by searching the module path. That makes it possible > to use the same module with puppet and puppetd without any changes. > > DavidCool, this is the information I was hoping to get. I want to write my modules in such a way that they just work with other sites, and it looks like puppet:/// uri''s are the way to do it. Thanks, -- Jeff McCune The Ohio State University Department of Mathematics Systems Manager _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users