Added identity parameter so that hosts would export fqdn as identity.



While using Mcollective with Foreman, if hosts are not exporting fqdn to mcollective, 'puppet run' from foreman would not work, as foreman-proxy uses fqdn for 'mco puppet runonce ' command .

Socket.gethostname is used for finding identity by default and could give just hostname in configurations like following..

[root@centos ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos
DOMAINNAME=ppp.com

1.9.3-p484 :002 > Socket.gethostname
 => "centos" 

Facter is more reliable..

# facter fqdn
centos.ppp.com