rowan holmes
2011-Apr-19 21:34 UTC
[Puppet Users] does puppet allow to a client specify a value in a configuration file?
hi everybody, In the server side we define a template for a configuration file. Our client pulls configuration file from the server without knowing any template is used or not, it just takes the catalog and puts the changes to the file. However, if a client wants to add an extra value to its configuration file that does not exist in the template, does puppet allow that? In other words, puppet forces a configuration file to a bunch of nodes but a node in this bunch wants to add an extra value by itself, it wont take that value from the server. thanks so much -- 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.
Denmat
2011-Apr-19 22:21 UTC
Re: [Puppet Users] does puppet allow to a client specify a value in a configuration file?
Hi, Well depending on what you''re trying to do exactly there are some ways to get around it. But this comes back to the essence of puppet, it is not just a deployment tool but it is used to describe and assert the configuration state you want on your node. A file that is volatile to wanted change on the node maybe better handled at the package level so you deploy a known state then the node makes changes after that. In this case you can still describe the file in the manifest but not the contents of the file (just that it''s present and has these perm values and so on). Other options really depend on the files in question, like they might allow local include files that can have the volatile changes. Cheers, Den On 20/04/2011, at 7:34, rowan holmes <rwn.hlms@gmail.com> wrote:> hi everybody, > > In the server side we define a template for a configuration file. Our > client pulls configuration file from the server without knowing any > template is used or not, it just takes the catalog and puts the > changes to the file. However, if a client wants to add an extra value > to its configuration file that does not exist in the template, does > puppet allow that? > > In other words, puppet forces a configuration file to a bunch of nodes > but a node in this bunch wants to add an extra value by itself, it > wont take that value from the server. > > thanks so much > > -- > 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. >-- 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.
Felix Frank
2011-Apr-20 07:35 UTC
Re: [Puppet Users] does puppet allow to a client specify a value in a configuration file?
On 04/19/2011 11:34 PM, rowan holmes wrote:> hi everybody, > > In the server side we define a template for a configuration file. Our > client pulls configuration file from the server without knowing any > template is used or not, it just takes the catalog and puts the > changes to the file. However, if a client wants to add an extra value > to its configuration file that does not exist in the template, does > puppet allow that? > > In other words, puppet forces a configuration file to a bunch of nodes > but a node in this bunch wants to add an extra value by itself, it > wont take that value from the server.The canonical way would be to extend the template such that the extra value will be added at the manifest''s discretion. The best way to integrate this really depends on the structure of you manifest. If this is 2.6, you may be able to add a parameter to the class declaring your file that controls wether the option is present. If you want an extra-versatile solution (or in fact need the client to control the contents), you can use a custom fact for use in your template. HTH, Felix -- 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.
rowan holmes
2011-Apr-21 06:01 UTC
[Puppet Users] Re: does puppet allow to a client specify a value in a configuration file?
Hi Denmat and Felix Thanks both of you very much for your help -- 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.
Kent
2011-Apr-21 17:53 UTC
[Puppet Users] Re: does puppet allow to a client specify a value in a configuration file?
I second what Felix said about custom facts. We use these all the time in templates. Another option is to use Dashboard parameters (if you are using Puppet Dashboard) in your templates. You can reference these in your manifests/templates in the same way you reference facts. Just create a parameter in Dashboard, setting a default value for it perhaps, and then override it to other values on a per-node or per-group basis. This can be nice when you have a config file you just need a couple versions of, for certain groups of nodes, rather than those that are unique per node. Kent On Apr 20, 11:01 pm, rowan holmes <rwn.h...@gmail.com> wrote:> Hi Denmat and Felix > > Thanks both of you very much for your help-- 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.