You really would be better off setting up a pair of nameservers if you can. I've never really seen a situation where you couldn't replace a cumbersome hosts file situation with a couple of DNS servers (Really, they are easy to setup and run).
However, to answer your question, you can use something like either puppet or cfengine to keep these in sync.
Another question though... I'm not sure why the first few lines need to change?
127.0.0.1 always points to the local machine and would always be localhost.localdomain localhost
The private IP of the machine will be the same hostname on the machine as it is on every other machine?