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 <mar...@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 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
OK, filed as #1358