Instead of doing something like this, it's often actually simpler and easier to manage if you use the built-in ssh certificate feature. Check out https://www.digitalocean.com/community/tutorials/how-to-crea... for an example of how to do that.
Now, no one has to remember to push the keys whenever something changes, and you no longer get spurious host key messages.