philicious/puppet-zookeeper-cdh4 — pull request #1 by stefanvanwouw (2013-11-05 11:04:47+00:00)
Title: Fix failing to set /etc/zookeeper/conf/myid when MYID is a Fixnum

In my case I am using numbers (Fixnum) in my $hosts parameter to the zookeeper class:

```
class { 'zookeeper':
hosts => hash(flatten(zip($zookeeper_hosts, range('1', size($zookeeper_hosts))))), # This generates a hash with FQDNs as keys and their 1-indexed position in the $zookeeper_hosts array as value.
data_dir => '/var/lib/zookeeper',
}
```

Instead of something less complicated with the values of the $hosts hash being Strings

```
class { 'zookeeper':
hosts => { 'hostname-1' => '1', 'hostname-2' => '2',
data_dir => '/var/lib/zookeeper',
}
```

The following error occurs when using numbers (the first code block) instead of strings (the second code block):

```
err: Failed to apply catalog: Parameter content failed: Munging failed for value in class content: can't convert Fixnum into String
```

Simply converting the $myid variable to a string as file contents fixes this problem.