Last Updated: February 25, 2016
·
2.392K
· pykler

Avoid Hyphens in Puppet Class Names

We had been using hyphens in class names until I faced an issue that I wasn't able to figure out. The issue is, if you have a class name with a hyphen, and then try to grab a fully qualified variable from the class, the puppet dsl parser thinks its a minus.

They seemed to fix the issue and should be released with puppet 3.5; but until then, use underscores if you need to but avoid the issue.

Here is the doc that briefly mentions the gotcha: http://projects.puppetlabs.com/projects/puppet/wiki/allowed_characters_in_identifier_names

Hopefully this helps save some time if you hit this issue.