enc output causes puppetserver to throw invalid tag error

77 views
Skip to first unread message

Joseph Lorenzini

unread,
Aug 2, 2016, 9:21:23 AM8/2/16
to Puppet Users
Hi all,

I am having a problem with external node classier. Here's the yaml output from the enc executable.

https://gist.github.com/jaloren/f7599e96c6a8c47591eb395f4680d48c

The yaml output inludes a parameterized class. When puppet server gets this yaml output, it throws the following exception.  

Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid tag '{"apache::server"=>{"version"=>"2.4.6-40.el7.centos.4"}}' on node node2

However, if the class is not parameterized (not a hash) but instead a list of classes, then the puppetserver compiles catalog without an error. Any idea what I am doing wrong? Based on the puppet docs, the yaml looks valid to me. 

Thanks,
Joe 

Craig Dunn

unread,
Aug 2, 2016, 10:24:39 AM8/2/16
to puppet...@googlegroups.com
On Tue, Aug 2, 2016 at 2:57 PM, Joseph Lorenzini <jal...@gmail.com> wrote:
Hi all,

I am having a problem with external node classier. Here's the yaml output from the enc executable.

https://gist.github.com/jaloren/f7599e96c6a8c47591eb395f4680d48c

The yaml output inludes a parameterized class. When puppet server gets this yaml output, it throws the following exception.  

Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid tag '{"apache::server"=>{"version"=>"2.4.6-40.el7.centos.4"}}' on node node2



classes is a hash, but in your YAML you have a trailing "-" behind the apache key which is translated as an array.... in short, this should work....

classes:
  apache::server:
    version: 2.4.6-40.el7.centos.4
environment: test

Note, there is no "-" behind "apache:"  See https://docs.puppet.com/guides/external_nodes.html#classes for more information

Craig

Reply all
Reply to author
Forward
0 new messages