Satellite :: Duplicate declaration

Latest response

Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[cc]

I'm looking for a solution for the Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class

Say
I have 2 completely independ puppet modules (a & b) that depends on puppet module cc
class a {
class {'::cc':}
.....
}

class b {
class {'::cc':}
.........
}

Is there a way to resolve this problem.

Responses

Maybe inheritance can help:

class a inherits c { other_resource{"":} }

class b inherits c { other_resource{"":} }

I have 2 small modules that need the same packages package { [ 'compat-libstdc++-33.x86_64','libstdc++-devel.x86_64'] }

This fails with same fault Duplicate declaration

The hole puppet run fails now. If i remove one, all runs fine.

Have a look on virtual resources, it should do the trick:

https://docs.puppet.com/puppet/3.8/reference/lang_virtual.html

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.