Set @node first, since it's used in hostsfile_path
Force priority to_i and hostname to_s