I''ll trying to work out the best way to configure networking in puppet, being routes, dns and ip addresses. First question... are definitions executed in the order they appear? If I put definitions way up the node hierarchy, and they are indeed executed first, I can be sure that the network will be configured first, which is what I want. However, I can''t put IP addresses way up the node hierarchy, as it doesn''t make sense. So... where do I put them? Doug. -- 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.
On Tue, Dec 15, 2009 at 3:14 PM, Scott Smith <scott@ohlol.net> wrote:> Douglas Garstang wrote: >> I''ll trying to work out the best way to configure networking in >> puppet, being routes, dns and ip addresses. >> > > http://github.com/ohlol/puppet-network > > Doesn''t handle route-#{iface} files, but would be trivial to add. > > -scottThanks Scott, so you have some definitions to reconfigure networking, but how do you ensure that they run BEFORE everything else? Doug. -- 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.
Douglas Garstang wrote:> I''ll trying to work out the best way to configure networking in > puppet, being routes, dns and ip addresses. >http://github.com/ohlol/puppet-network Doesn''t handle route-#{iface} files, but would be trivial to add. -scott -- 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.
Scott Smith wrote:> http://github.com/ohlol/puppet-network > > Doesn''t handle route-#{iface} files, but would be trivial to add. >Scratch that -- it does! :) Been a long time since I wrote that. -scott -- 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.
Douglas Garstang wrote:> On Tue, Dec 15, 2009 at 3:14 PM, Scott Smith <scott@ohlol.net> wrote: >> Douglas Garstang wrote: >>> I''ll trying to work out the best way to configure networking in >>> puppet, being routes, dns and ip addresses. >>> >> http://github.com/ohlol/puppet-network >> >> Doesn''t handle route-#{iface} files, but would be trivial to add. >> >> -scott > > Thanks Scott, so you have some definitions to reconfigure networking, > but how do you ensure that they run BEFORE everything else? >You can use require => -scott -- 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.
On Tue, Dec 15, 2009 at 3:21 PM, Scott Smith <scott@ohlol.net> wrote:> Douglas Garstang wrote: >> On Tue, Dec 15, 2009 at 3:14 PM, Scott Smith <scott@ohlol.net> wrote: >>> Douglas Garstang wrote: >>>> I''ll trying to work out the best way to configure networking in >>>> puppet, being routes, dns and ip addresses. >>>> >>> http://github.com/ohlol/puppet-network >>> >>> Doesn''t handle route-#{iface} files, but would be trivial to add. >>> >>> -scott >> >> Thanks Scott, so you have some definitions to reconfigure networking, >> but how do you ensure that they run BEFORE everything else? >> > > You can use require =>Require in a definition, or in the classes? It doesn''t seem feasible to me to put a require on every single object in my puppet config requiring networking! Doug -- 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.
On Tue, Dec 15, 2009 at 3:22 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Tue, Dec 15, 2009 at 3:21 PM, Scott Smith <scott@ohlol.net> wrote: >> Douglas Garstang wrote: >>> On Tue, Dec 15, 2009 at 3:14 PM, Scott Smith <scott@ohlol.net> wrote: >>>> Douglas Garstang wrote: >>>>> I''ll trying to work out the best way to configure networking in >>>>> puppet, being routes, dns and ip addresses. >>>>> >>>> http://github.com/ohlol/puppet-network >>>> >>>> Doesn''t handle route-#{iface} files, but would be trivial to add. >>>> >>>> -scott >>> >>> Thanks Scott, so you have some definitions to reconfigure networking, >>> but how do you ensure that they run BEFORE everything else? >>> >> >> You can use require => > > Require in a definition, or in the classes? It doesn''t seem feasible > to me to put a require on every single object in my puppet config > requiring networking! > > Doug >And... even then I''d be requiring a definition, not a class. Is that even valid? How would the syntax look? -- 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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1> First question... are definitions executed in the order they appear?puppet doesn''t execute anything. it manages resources and defines are resources as well. cheers pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAksoIAEACgkQbwltcAfKi3/t9wCeOrOj9JhiI1DfNugwI3DzxPOc TqQAoIq6pL9fE3iyIQsgiwEdBYEn4G5Z =By1d -----END PGP SIGNATURE----- -- 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.
On Tue, Dec 15, 2009 at 3:47 PM, Peter Meier <peter.meier@immerda.ch> wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > >> First question... are definitions executed in the order they appear? > > puppet doesn''t execute anything. it manages resources and defines are > resources as well.Fine. Does puppet manages resources and defines in the order they appear? Doug. -- 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.
Douglas Garstang writes: > On Tue, Dec 15, 2009 at 3:47 PM, Peter Meier <peter.meier@immerda.ch> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > >> First question... are definitions executed in the order they appear? > > > > puppet doesn''t execute anything. it manages resources and defines are > > resources as well. > > Fine. Does puppet manages resources and defines in the order they appear? Ordering is indeterminate unless "require" or "before" are used in resource definitions, which then produce the declared ordering relationship. -- 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.
Douglas Garstang wrote:> On Tue, Dec 15, 2009 at 3:47 PM, Peter Meier <peter.meier@immerda.ch> wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >>> First question... are definitions executed in the order they appear? >> puppet doesn''t execute anything. it manages resources and defines are >> resources as well. > > Fine. Does puppet manages resources and defines in the order they appear? >No, it''s declarative, not imperative. http://en.wikipedia.org/wiki/Declarative_programming http://en.wikipedia.org/wiki/Imperative_programming -scott -- 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.
On Tue, Dec 15, 2009 at 3:59 PM, Steven VanDevender <stevev@uoregon.edu> wrote:> Douglas Garstang writes: > > On Tue, Dec 15, 2009 at 3:47 PM, Peter Meier <peter.meier@immerda.ch> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > >> First question... are definitions executed in the order they appear? > > > > > > puppet doesn''t execute anything. it manages resources and defines are > > > resources as well. > > > > Fine. Does puppet manages resources and defines in the order they appear? > > Ordering is indeterminate unless "require" or "before" are used in > resource definitions, which then produce the declared ordering > relationship.I was hoping that was just classes. Watching the logs seemed to indicate that definitions were acted upon first. Oh well, back to my original question. How can I make sure that my network definitions are done FIRST? And before anyone says to use require, I can''t a) put require on every single damn resource in my puppet config requiring the networking. That''s asinine and b) How do you require a definition? That makes no sense. Doug. -- 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.
On Dec 15, 5:01 pm, Douglas Garstang <doug.garst...@gmail.com> wrote:> I''ll trying to work out the best way to configure networking in > puppet, being routes, dns and ip addresses. > > First question... are definitions executed in the order they appear?Do not attempt to rely on file order to control the sequence in which Puppet applies resources to the client system. Individual resources should instead use the "require" and / or "before" parameters to express dependencies on other resources or classes. I note also that you need to already have at least a partially- functional network configuration for Puppet to be able to retrieve its catalog from a remote puppetmaster. That makes for a bit of a chicken- and-egg problem with using Puppet to set up networking. It''s not insurmountable, and no doubt you''ve already thought about that, but I just thought I''d mention it. -- 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.
Douglas Garstang wrote:> b) How do you require a definition? That makes no sense.A definition is essentially just a custom resource. -scott -- 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.
On Tuesday 15 December 2009 23:39:31 Douglas Garstang wrote:> And... even then I''d be requiring a definition, not a class. Is that > even valid? How would the syntax look?Definition is like a custom type so define foo() {} foo {''bar'':} file {''/tmp/bar'': require => Foo[''bar''] } -- Michael Gliwinski Henderson Group Information Services 9-11 Hightown Avenue, Newtownabby, BT36 4RT Phone: 028 9034 3319 ********************************************************************************************** The information in this email is confidential and may be legally privileged. It is intended solely for the addressee and access to the email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed in the governing client engagement leter or contract. If you have received this email in error please notify support@henderson-group.com John Henderson (Holdings) Ltd Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT. Registered in Northern Ireland Registration Number NI010588 Vat No.: 814 6399 12 ********************************************************************************* -- 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.