Hi,

I've got the following statements in my manifest:

$myusers_json = generate ('/bin/sh', '-c', '/path/to/my/script.sh')
notice ($myusers_json)
$myusers = parsejson ($myusers_json)
notice ($myusers)


My script generates a list of users in JSON and I've verified that the 
output format from 'notice ($myusers_json)' is correct using jsonlint.com.
However, the output of 'notice ($myusers)' is always limited to 1985 bytes. 
It's just truncating the output. I know it's not just a short-coming
of the 'notice' function because when I call

create_resources(user, $myusers)


if fails with the error 

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
expected ',' or '}' in object at '"user1" : {  "'! at 
/etc/puppet/environments/mgmt/manifests/01-all-nodes.pp:24 on node 
pupper-server1


If I modify script.sh so that the result is less than a certain length 
(depends on the number of fields and how many ':' get converted to '=>'), it
works just fine. But the final output in puppet has format is being limited 
to 1985 bytes.

Any fix or work-around for this?

Thanks!

- Allen

-- 
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/e9b51ab4-17ce-43eb-89c6-01ccf24c7ef9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to