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
Laisser un commentaire
Participez-vous à la discussion?N'hésitez pas à contribuer!