Duplicate declaration in Puppet

30 Jun 2013

I have encountered the duplicate declaration problem in Puppet.

Here are the things that I learn:

A module (the module path) already exists. You can use them

This means that, if you want to use the default config, just use `include nginx`.

However, if you want to override some configs, you need to exclude `include` and just use the class directly. For example,

class { 'nginx': ruby_version => 'ruby-2.0.0-p195', passenger_version => '4.0.5' }

One module might already include another module

Therefore, you don't need to configure or include it again in your config file.

Give it a kudos