I’m hitting a bug somewhat similar to this:
I have a parametrized class that I use on one of my node. Everything works just fine at first.
When I go to the class configuration and use the smart parameter override however, I get a duplicate resource declaration:
Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Apt] is already declared; cannot redeclare at /srv/puppet/environments/production/manifests/apt.pp:2 at /srv/puppet/environments/production/manifests/apt.pp:2:5 on node somenode
I am definitely sure I did not change that Apt class or anything relevant to it.
Simply disabling the override makes the error disappear.