Issue #10704 has been updated by Philip Wigg.

I would just like to add that Windows seems to have a limit of nine host 
aliases per line.

So if you want to alias more than nine hosts to an IP, you need multiple lines 
starting with the same IP address.


----------------------------------------
Bug #10704: puppet's idea of /etc/hosts management does not match real world use
https://projects.puppetlabs.com/issues/10704#change-75019

Author: Bill Tong
Status: Accepted
Priority: High
Assignee: 
Category: host
Target version: 3.x
Affected Puppet version: 2.7.6
Keywords: 
Branch: 


Here is a valid extract from an /etc/hosts files on a RHEL box:

    127.0.0.1   localhost localhost.localdomain localhost4 
localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 
localhost6.localdomain6

Here is the code to make puppet add these entries:

        host { 'localhost':
                ip => '127.0.0.1',
                host_aliases => [ 'localhost.localdomain',
                        'localhost4', 'localhost4.localdomain4', ],
        }

       host { 'localhost':
               ip => '::1',
               host_aliases => [ 'localhost.localdomain',
                       'localhost6', 'localhost6.localdomain6', ],
       }

Notice the "localhost" part is the same in both cases. This causes a problem:

    Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate definition: Host[localhost] is already defined in file 
/etc/puppet/modules/networking/manifests/init.pp

puppet-2.7.6-2.el6.noarch


-- 
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