Error: Class 'example' is already defined

asked 2019-01-02 12:36:20 -0600

Chutki gravatar image

updated 2019-01-03 08:39:47 -0600

Hi,

Below updated one is init.pp file

class example (
  $install_version = $example::params::install_version
) inherits example::params {
  class {"::example::v${install_version}":  }
}

This is params manifest

classe example::params {
  $install_version = hiera('example::version','1_1')
}

I am getting error after ran puppet.

Error: Class 'example' is already defined (file: /etc/puppetlabs/code/environments/modules/example/manifests/init.pp, line: 4); cannot redefine (file: /etc/puppetlabs/code/environments/modules/example/manifests/init.pp, line: 4) on node test.example.com

My puppet version is 5.3.4,

Is it problem with environment.

edit retag flag offensive close merge delete