Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to put together a set of puppet policies for grub/menu.lst. The serial::grubmenulst is a puppet define type that looks like this :

define serial::grubmenulst ( $value ) {
   $key = $title
   $context = "/files/boot/grub/menu.lst"
   augeas { "grubmenulst/${key}":
     context => "$context",
     onlyif  => "get $key != '$value'",
     changes => "set $key '$value'",

It is implemented in the following way :

$svar = "${serial_tty},${serial_speed}n8r"
serial::grubmenulst {
    "terminal/console" : value => "";
    "title[1]/kernel/elevator" : value => "deadline";
    "title[1]/kernel/console[1]" : value => "${svar}"; ### It Fails for this Line otherwise it works

Puppet agent complains during the run (see below). Note that, the code works if I comment out the last line: "title[1]/kernel/console[1]" : value => "${svar}". My initial guess is that puppet-augeas is not able to parse more than one array values for a key... (!?)

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:     Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type serial::grubmenulst at /etc/puppet/modules/serial/manifests/serial.pp:16 on node <nodename>

Any suggestions ?

share|improve this question
I can't see that the error and the line you added are in any way related. Can you provide the file path that the define is in? –  m0dlx Mar 22 '13 at 19:24
what relation are you looking for ? Line#16 (as in the error) is the curly brace that ends the serial::grubmenulst. The file path for the define is /etc/puppet/module/serial/manifests/grubmenulst.pp. As I mentioned, without the last line the code works. –  iamauser Mar 22 '13 at 19:28
I was wondering if it wasn't in grubmenulst.pp whether it was working by chance earlier under the autoloader. Maybe try separating it into three separate resources instead of using the combined syntax - it could be a parser bug? It's not to do with the Augeas integration, you're hitting a parsing/define loading issue before it gets anywhere near the Augeas provider. –  m0dlx Mar 22 '13 at 19:36
What version of Puppet are you using? Is the serial::grubmenulst define in a proper autoloaded file? –  ℝaphink Mar 23 '13 at 10:30
i am using puppet-3.0.2.x. I believe the norm is a autoloader in the new version. I just kept the old style of defining it with the namespace instead of just the name. –  iamauser Mar 23 '13 at 13:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.