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

- old
+ new

@@ -176,11 +176,11 @@ server['ip_address'] = server['floating_ip'] else server['ip_address'] = server_ip end sg.cache_to_disk - hosts_file_data += "#{server_ip}\t#{server['hostname']}\n" + hosts_file_data += "#{server_ip}\t#{server['hostname']}\t#{server['hostname']}.local\n" end end rescue Timeout::Error => te raise KytoonException, "Timeout building server group." end @@ -216,10 +216,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}