2

I have a puppet module installed that is called ntp.

A node do I define by

node testip { include myconfig::ntpp }

and in /etc/puppet/modules/myconfig/manifests/init.pp have I

class myconfig::ntpp {
  include common
  class {'ntp':
      server_list => $common::data::ntpServerList
  }
}

This works perfectly.

But if I replace myconfig::ntpp with myconfig::ntp I get

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Class[Myconfig::Ntp] is already declared; cannot redeclare on node testip

Question

Is it possible to have my node look like?:

node testip { include myconfig::ntp }
Sandra
  • 10,303
  • 38
  • 112
  • 165

1 Answers1

4

This is a design issue in puppet on how puppet tries to resolve the classnames. See this ticket for more info or this link regarding namespaces.

And you should try to access your top level NTP modules with

class { "::ntp":
   server_list => ...
}
HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
jfried
  • 451
  • 3
  • 4