user3756479
user3756479

Reputation: 11

puppet giving class is not found

I was trying to write a module for epel repo.

here is the content of that module.

[root@ manifests]# cat init.pp
class epel {
            file { "/etc/yum.repos.d/epel.repo":
            ensure  => "present",
            mode    => "400",
            owner   => "root",
            group   => "root",
            source => "puppet://$puppetmaster/modules/yumrepos/files/epel.repo"
}

}

While applying this module to client side, I am getting following error.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class epel for

Please tell me where will be the error exists.

Thanks in adv Sankar

Upvotes: 1

Views: 854

Answers (1)

Felix Frank
Felix Frank

Reputation: 8223

The class epel will only be located if the init.pp file is in the epel module.

Make sure that

  • The file is in the manifests subdirectory
  • The epel tree (including manifests/) is in a module search directory of the current environment
  • There is no other epel module (this is pretty far fetched, though)

Note that you probably want to use the yumrepo type to manage repositories, instead of deploying prepared configuration files.

Upvotes: 1

Related Questions