Hi everyone, I''ve been using templates to set up some configuration files, but the templates don''t always get rewritten when I would like, so I thought I''d bring it up to see if anyone has any insight. Here''s an example template, used for setting up a yum repository. The password and IP address are setup using an out of band mechanism, and are not always available the first time the template is run. However, it is soon available, but the template does not always rerun to get the new info. All the functions do is search files on the local filesystem. Thanks for help, Alex <% load "/var/lib/puppet/templates/funcs.rb" puppetmasterip = get_client_info_unique("puppet", "ipaddress") httppassword = get_client_info_unique("puppet", "yumhttpdpassword") %>https://deploy:<%= httppassword %>@<%= puppetmasterip %>/yum-repo/pidocs/
On Sep 3, 2007, at 6:46 PM, Alexander Taler wrote:> However, it is soon available, but the template does not always > rerun to get the new info.Puppet should recompile its configuration if the client''s facts change or if any remote files, including templates, change. There''s a 15 second window in which the master won''t attempt to reread the file, but after that it should notice. I take it you''re not experiencing that? Can you provide more information on your setup? You using puppetmasterd or just puppet? What does the debug output of a run look like in which the template should get written but doesn''t? Does the template get rewritten if you run puppetd with ''--test'', which will force a recompile? -- To get back my youth I would do anything in the world, except take exercise, get up early, or be respectable. -- Oscar Wilde --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Tue, Sep 04, 2007 at 11:33:39PM -0500, Luke Kanies wrote:> On Sep 3, 2007, at 6:46 PM, Alexander Taler wrote: > > >However, it is soon available, but the template does not always > >rerun to get the new info. > > Puppet should recompile its configuration if the client''s facts > change or if any remote files, including templates, change. There''s > a 15 second window in which the master won''t attempt to reread the > file, but after that it should notice. > > I take it you''re not experiencing that? > > Can you provide more information on your setup? You using > puppetmasterd or just puppet? What does the debug output of a run > look like in which the template should get written but doesn''t? Does > the template get rewritten if you run puppetd with ''--test'', which > will force a recompile?I have encountered what may ba a related problem to this, and produced a simple example to reproduce the problem. I logged it as ticket #825. The reason I suspect they are related is that they both use Ruby code to read files (in the template and in a function), and neither of them are seeing changes to that file. I''ll reexamine the template situation once the function one is dealt with. Thanks for your help, Alex