In most Linux distributions, if there are multiple entries for a host in
/etc/hosts the first entry has precedence. With the Puppet host resource,
if there are multiple entries for that name, Puppet will modify the last
entry.
So if a system has a /etc/hosts file with the following entries:
127.0.0.5 testhost
127.0.0.6 testhost
testhost will resolve to 127.0.0.5
When a Puppet host resource is applied to that server like
host { 'testhost':
ip => '127.0.0.7',
}
The /etc/hosts file will become
127.0.0.5 testhost
127.0.0.7 testhost
And testhost will still resolve to 127.0.0.5.
I have seen this behavior in Puppet 6 and Puppet 7.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/f9af2d92-f6f7-47c7-9bcf-f08bfe56bb2an%40googlegroups.com.