puppetlabs/puppetlabs-mcollective — pull request #139 by pythianjoseph (2014-05-01 07:46:17+00:00)
Title: Added identity parameter so that hosts would export fqdn as identity regardless of the hostname configuartion.

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
```