example42 / puppet-yum

Puppet module for Yum
Other
43 stars 116 forks source link

Illegal fully qualified name at /modules/yum/manifests/repo/10gen.pp:5:18 #126

Closed erikanderson closed 8 years ago

erikanderson commented 8 years ago

We are getting ready to move from 3.8 to 4.2 so we turned on the future parser. It fails when parsing 10gen.pp most likely because of the number in the class name (although I don't see this in the deprecation list)

The file in question:

# = Class: yum::repo::10gen
#
# This class installs the 10gen repo for MongoDB
#
class yum::repo::10gen (
  $baseurl = "http://downloads-distro.mongodb.org/repo/redhat/os/${::architecture}",
) {
  yum::managed_yumrepo { '10gen':
    descr       => '10gen Repository',
    baseurl     => $baseurl,
    enabled     => 1,
    gpgcheck    => 0,
  }
}

and the error:

$ puppet parser validate /puppet/modules/yum/manifests/repo/10gen.pp
Error: Could not parse for environment production: 
Illegal fully qualified name at 
/puppet/modules/yum/manifests/repo/10gen.pp:5:18

I renamed the class to yum::repo::tengen and it passed the parser. Another alternative is to rename it to mongodb to mirror the company name change

alvagante commented 8 years ago

yes, the number is not allowed at the beginning of classnames in Puppet 4. Would you provide a PR with the tengen class ADDED (we keep 10gen for backward compatibility)?

erikanderson commented 8 years ago

It's a little redundant but I made the PR: https://github.com/example42/puppet-yum/pull/128

alvagante commented 8 years ago

thank you!