Hi, Here is an interesting problem. Right after a host called "foo" is built, just before the first puppet run, the /etc/hosts file contains the following entry: 1.2.3.4 foo However, in order to match the information that is in DNS, I want the line to look like this: 1.2.3.4 somedomain.com foo.colo.domain foo Let''s try to keep aside the discussion of whether that is actually a sane thing to do, I''m still just experimenting. Let''s focus on what may be necessary to make puppet replace the existing line with what I want there to be. I added something like this to the manifest: host { foo: ensure => absent } host { "somedomain.com": ip => "1.2.3.4", alias => [ "foo.colo.domain", "foo" ] } However, surprisingly (or maybe not), what I get is just an early failure: Host[somedomain.com] is already being managed I guess this is because of the dual purpose of "alias" param/metaparam. Is this a bug? Is it possible to make puppet do what I want it to do, without just doing file { "/etc/hosts": ... }? -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown --~--~---------~--~----~------------~-------~--~----~ 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 Jun 10, 2008, at 4:34 PM, Marcin Owsiany wrote:> > Hi, > > Here is an interesting problem. Right after a host called "foo" is > built, just > before the first puppet run, the /etc/hosts file contains the > following entry: > > 1.2.3.4 foo > > However, in order to match the information that is in DNS, I want > the line to > look like this: > > 1.2.3.4 somedomain.com foo.colo.domain foo > > Let''s try to keep aside the discussion of whether that is actually a > sane thing > to do, I''m still just experimenting. Let''s focus on what may be > necessary to > make puppet replace the existing line with what I want there to be. > I added > something like this to the manifest: > > > host { foo: ensure => absent } > host { "somedomain.com": > ip => "1.2.3.4", > alias => [ "foo.colo.domain", "foo" ] > } > > However, surprisingly (or maybe not), what I get is just an early > failure: > > Host[somedomain.com] is already being managed > > I guess this is because of the dual purpose of "alias" param/ > metaparam. > > Is this a bug? Is it possible to make puppet do what I want it to > do, without > just doing file { "/etc/hosts": ... }?You are correct that the problem you''re experiencing is because of the dual roles of the alias parameter. I don''t think there''s really a solution to this right now if you require that the longer name be the first name in /etc/hosts. -- Everything that is really great and inspiring is created by the individual who can labor in freedom. -- Albert Einstein --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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, Jun 10, 2008 at 09:36:22PM -0500, Luke Kanies wrote:> You are correct that the problem you''re experiencing is because of the > dual roles of the alias parameter. > > I don''t think there''s really a solution to this right now if you > require that the longer name be the first name in /etc/hosts.OK, filed as #1358 -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---