Issue #10919 has been updated by Ryan Coleman.

Thank you for the explanation, 'why' is clear now. Cheers!

Stefan Schulte wrote:
> The problem here is that puppet in general needs a key to identify a resource 
> (the resource's title) und that key has to be unique. In case of the host 
> type the key is the hostname. So when the provider (in case of the host type 
> we just have one provider: `parsed`) looks through your host file, it will 
> parse your local host entries like this
> 
> [...]
> 
> So the provider comes up with two resources called localhost and puppet will 
> just pick one and drop the other (that is what the message is trying to tell 
> you).
> 
> I hope the cause of the message is now clear, however you are right that this 
> message is not very helpful. The ultimate solution is of course to somehow 
> support the usecase where you want to manage multiple entries in your host 
> file with the same name.


----------------------------------------
Bug #10919: puppet resource host generates a warning that is not clear
https://projects.puppetlabs.com/issues/10919

Author: Ryan Coleman
Status: Accepted
Priority: Low
Assignee: 
Category: ralsh
Target version: 2.7.x
Affected Puppet version: 2.7.6
Keywords: 
Branch: 


Consider an /etc/hosts file that looks like this:
<pre>
[root@puppet ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.121.132 puppet.puppetlabs.vm
</pre>

Executing 'puppet resource host' to inspect this file produces the following 
output:
<pre>
[root@puppet ~]# puppet resource host
warning: Host localhost found in both parsed and parsed; skipping the parsed 
version
host { 'localhost':
  ensure       => 'present',
  host_aliases => ['localhost.localdomain', 'localhost4', 
'localhost4.localdomain4'],
  ip           => '127.0.0.1',
  target       => '/etc/hosts',
}
host { 'puppet.puppetlabs.vm':
  ensure => 'present',
  ip     => '192.168.121.132',
  target => '/etc/hosts',
}
</pre>


What is the warning trying to tell me?

I'm using a vanilla CentOS 6 machine with PE2 installed. 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to