Correct bug where the ip field was not being used

The machines were being created at random addresses because the ip field in the template wasn't being used by the script.