@John, thanks for your patients with me.  I'm a total noob at this stuff. 
 Following the links you gave me, I came up with this: {name  => 'foo', ip 
=> '192.168.168.1'}
But the agent says:
 Error 400 on SERVER: "{name  => 'foo', ip => '192.168.168.1'}" is not a 
Hash. 

The image below from the PE dashboard is why I was trying JSON format 
previously.

<https://lh3.googleusercontent.com/-TWbjAQbAqrY/VZLDhoL4DyI/AAAAAAAAQW8/sQOP_-BSY4E/s1600/PE%2Bjson.PNG>



When I use JSON format, it says it can't convert it into a Hash.

Using your provided sample snippet:
Error 400 on SERVER: "'hosts::hostentries':   'puppet.mybluebolt.com':     
'ip': '10.150.28.8'     'host_aliases': 'puppet'" is not a Hash.

I fee like I'm a fish flopping around on the ground...



On Tuesday, June 30, 2015 at 9:04:51 AM UTC-7, jcbollinger wrote:
>
>
>
> On Monday, June 29, 2015 at 4:01:36 PM UTC-5, Aaron Lager wrote:
>>
>> So I started over from scratch, and now I get the following error on the 
>> agent:
>>  sudo puppet agent --test
>> Info: Retrieving pluginfacts
>> Info: Retrieving plugin
>> Info: Loading facts
>> Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: can't convert Array into Hash at 
>> /etc/puppetlabs/puppet/environments/production/modules/hosts/manifests/init.pp:149
>>  
>> on node
>>
>> line 149 is
>> 146   if $host_entries != undef {
>> 147     $host_entries_real = delete($host_entries,$::fqdn)
>> 148     validate_hash($host_entries_real)
>> 149     create_resources(host,$host_entries_real)
>> 150   }
>>
>>
>> What is wrong with my syntax?
>>
>>
>
> The module is using the create_resources() function, so the expected form 
> for your data is exactly the one I guessed in my previous message: a hash 
> in which the keys are host names (corresponding to Host resource names / 
> titles), and the values are themselves hashes associating Host resource 
> parameter names with values.  In addition to the example data, I provided 
> links to the docs for the create_resources() function and the Host 
> resource.  The error message seems to indicate that the data the module 
> receives are formed differently than it expects, which would be true of 
> both the forms you described using.
>
>
> John
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3c9c6b8b-5223-4592-ac8d-6d741b4d87eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to