Hi, I''ve got a template that creates a file from an array, which is no problem. I''m stuck on how to expand this so I can add elements to the array from different classes. I basically want to be able to modify the file from different classes, is the augeas tool the best option? i''ve never used it yet so not sure if it would fit the bill. The modifications is in a specific place, and will change depending on if it''s already been modified or not. So the array solution was really good, but i''m having trouble making sure the array is built from different classes before the file gets written. I haven''t tried using a require => Class on the file type as it would grow substantially. Any of that make sense? --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
HI Matt, augeas is a good solution for multiple different classes that modify a file in the same run. A good example is nsswitch where different classes (autofs, resolve, nis, etc..) may want to edit the file. The catch is the that a lense must exist for the file type. It seemed to me like writing a custom lense is non trivial. If you write one, let me know how it was:) if you need a finer level of control think about writing a custom node classifier that can generate these arrays based on the classes to the used. You may have to change your architecture for this, but you should probably be using an external source to define config and classes anyways. hopefully this is helpful for you. Dan --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---