When switching to Puppet directory environments, you might get the following error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Import loop detected for /etc/puppet/environments/production/manifests/includedfile.pp at /etc/puppet/environments/production/manifests/site.pp:16 on node the_name_of_your_node

This error happens because when using directory environments, the manifest entry point is $confdir/environments/<ENVIRONMENT NAME>/manifests instead of manifests/site.pp. Puppet will read all files and consider them as one big manifest. The solution is to remove from site.pp the includes to the other files in the same directory. Warning: you still need to include files in subdirectories, as Puppet will only merge files in the first level directory.

More information can be found at https://docs.puppetlabs.com/puppet/latest/reference/dirs_manifest.html

0 réponses

Laisser un commentaire

Participez-vous à la discussion?
N'hésitez pas à contribuer!

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.