devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 146 forks source link

Windows hostfile has a maximum of nine hostname aliases per line #252

Open neikei opened 6 years ago

neikei commented 6 years ago

Windows only allows 9 host entries per line, but the hostmanager plugin adds every host alias into one line. So, the hostmanager has to split the entries into packages of nine aliases and add more than one line if it is necessary.

# Current hostfile creation
127.0.0.1  domain.tld
127.0.0.1  h01.domain.tld h02.domain.tld h03.domain.tld h04.domain.tld h05.domain.tld h06.domain.tld h07.domain.tld h08domain.tld h09domain.tld h10domain.tld h11domain.tld

# Working hostfile
127.0.0.1  domain.tld
127.0.0.1  h01.domain.tld h02.domain.tld h03.domain.tld h04.domain.tld h05.domain.tld h06.domain.tld h07.domain.tld h08domain.tld h09domain.tld
127.0.0.1  h10domain.tld h11domain.tld

Source: https://superuser.com/questions/932112/is-there-a-maxium-number-of-hostname-aliases-per-line-in-a-windows-hosts-file#932113