lib/kytoon/providers/libvirt/server_group.rb in kytoon-1.3.5 vs lib/kytoon/providers/libvirt/server_group.rb in kytoon-1.3.6

- old
+ new

@@ -166,11 +166,11 @@ disk_path=File.join(image_dir, "#{sg.id}_#{server['hostname']}.img") server['disk_path'] = disk_path instance_ip = create_instance(sg.id, server['hostname'], server['memory'], server['original'], server['original_xml'], disk_path, server['create_cow'], server['selinux_enabled'], ssh_public_key, sudo) server['ip_address'] = instance_ip - hosts_file_data += "#{instance_ip}\t#{server['hostname']}\n" + hosts_file_data += "#{instance_ip}\t#{server['hostname']}\t#{server['hostname']}.local\n" sg.cache_to_disk end puts "Copying hosts files..." @@ -203,10 +203,10 @@ ping_test(server['ip_address']) Kytoon::Util.remote_exec(%{ cat > /etc/hosts <<-EOF_CAT #{hosts_file_data} EOF_CAT -hostname "#{server['hostname']}" +hostname "#{server['hostname']}.local" if [ -f /etc/sysconfig/network ]; then sed -e "s|^HOSTNAME.*|HOSTNAME=#{server['hostname']}|" -i /etc/sysconfig/network fi #{server['gateway'] == 'true' ? gateway_ssh_config : ""} #{node_ssh_config}