Kickstart puppet run registers duplicate host in Foreman as 'localhost.localdomain'

Morning all

I'm currently testing building some Centos systems using Foreman.

I've managed to get nodes kickstarting and building without any issues,
however my challenge seems to come in when the node is trying to register
itself as built.

Below is an example from foreman production.log:

Started GET "/node/" for at
> 2013-10-24 10:57:43 +0100
> Processing by HostsController#externalNodes as YML
> Parameters: {"name"=>""}
> Rendered text template (0.0ms)
> Completed 200 OK in 86ms (Views: 2.4ms | ActiveRecord: 9.7ms)
> Started POST "/reports/create?format=yml" for at 2013-10-24
> 10:57:46 +0100
> Processing by ReportsController#create as YML
> Parameters: {"report"=>"[FILTERED]"}
> processing report for
> Rendered text template (0.0ms)
> Completed 200 OK in 4171ms (Views: 2.4ms | ActiveRecord: 1306.5ms)
> Started GET "/unattended/built" for at 2013-10-24 10:57:50 +0100
> Processing by UnattendedController#built as /
> Found
> unattended: is Built!
> Completed 409 Conflict in 3362ms (ActiveRecord: 64.3ms)
However the system is still showing as 'Building'. When I try to manually
mark the system as built, then I get an error message of:

> Failed to cancel pending build for

Again looking in production.log, I get:

> Started GET "/hosts/" for
> at 2013-10-24 11:52:09 +0100
> Processing by HostsController#cancelBuild as HTML
> Parameters: {"id"=>""}
> Failed to save: Ip has already been taken, Mac has already been taken
> Redirected to https://foreman/hosts/
> Completed 302 Found in 228ms (ActiveRecord: 27.7ms)

This lead me to look for other hosts with the same IP address, which gives
me a host called 'localhost.localdomain'.

I can only assume that when the kickstart %post section runs Puppet, the
hostname either isn't set correctly, or Facter is mis-reading it?

A copy of my kickstart is available here:

Any ideas?