Good Afternoon, all,

I believe I posted something on this in the past, but didn't get many
replies.

I'm trying to manage some slightly different configs for different
classes of hosts within templates using
scope.compiler.classlist.include. Specifically, for example, all of our
hosts have the same httpd.conf file, with the exception of two hosts
(each of which have a unique class defined in them).

Something like:
<% if scope.compiler.classlist.include?("fooClass") then %>
foo
bar
baz
<% end %>

I originally tried this with both the template for httpd.conf and the
template for /etc/sysconfig/iptables.

On all of the hosts that use these methods, I'm seeing some strange
behavior where intermittently (sometimes as much as 50/50, exactly 1 on
1 off) the if statement does not evaluate, and the segment of code
within it doesn't get applied. I've looked through the logs to no end -
all I can see is that these files flap back and forth endlessly,
removing the generated file, replacing it with a new one, the replacing
it with the original (the MD5 sums also reveal the A-B-A-B pattern).

I'm using an external node classifier script, but have been dumping its'
output to a timestamped log file, and the output is always correct (the
classes in question always appear in the YAML).

Any ideas?

I'm aware of the pervasive theory of using fragment-based file creation,
but have a few issues:
1) I very much want to keep all code related to a certain file in one
place (i.e. the iptables module should test for presence of each service
and then create the iptables file the way it wants to, not including
iptables information in other modules). I'd prefer not to scatter code
related to one concept (iptables, httpd) in different modules.
2) For some of these files, order is *very* important (we run a ...
complex... iptables ruleset) and, if this code were split across
multiple modules, it would require reading through endless files to
figure out where lines X, Y and Z should go.

Has anyone else experienced any issues like this?

Thanks,
Jason Antman
Rutgers University

PS - All boxes are CentOS 5.3 x86_64 running Puppet 0.24.8 (0.24.8-4.el5).

-- 

Linux: The smack in the face that Windows gripers have been begging for these 
past 10 years...

--

Jason Antman
www.jasonantman.com
ja...@jasonantman.com
Cell: (201)906-7347

Systems Programmer
Rutgers University
OIT Central Systems & Services / NetOps
jant...@ccf.rutgers.edu



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to