Bug #566

Single character definition names result in 'Invalid tag'

Added by kbrede - almost 5 years ago. Updated over 4 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Luke Kanies % Done:

0%

Category:-
Target version:0.25.0
Affected Puppet version:0.25.4 Branch:
Keywords:
Votes: 0

Description

Below is a simplified version of a class I’m using. I found that

using a single character in the case statement results in the

following error.

[root@puppet classes]# puppetd -v -o

notice: Ignoring —listen on onetime run

info: Facts have changed; recompiling

err: Could not retrieve configuration: Invalid tag “w”

define check_usr_bin {
   case $name {
       "w":     { file { "/usr/bin/$name": mode => 0555 } }
       default: { file { "/usr/bin/$name": mode => 0755 } }
   }
}

class check_usr_bin_files {
   $usr_bin_files = [[at" "w" "watch]]
   check_usr_bin { $usr_bin_files: }
}

History

Updated by Luke Kanies almost 5 years ago

  • Status changed from 1 to 2

This is actually a problem with definitions, not with case. The following code results in the same failure:

define testing($command) {
    exec { $name: command => $command }
}
testing { a: command => "/bin/echo true" }

Updated by Luke Kanies over 4 years ago

  • Status changed from 2 to Closed
  • 7 set to fixed

Fixed in r2523.

Also available in: Atom PDF