puppet.conf includes a syntax or formatting error, you get an error message running a Puppet command in Puppet Enterprise.
You get this error message running a Puppet command in PE:
Error: Could not parse /etc/puppetlabs/puppet/puppet.conf: Could not match line <LINE CONTENTS> (file: /etc/puppetlabs/puppet/puppet.conf, line: <LINE NUMBER>)
Version and installation information
PE version: All supported
To find syntax and formatting errors in the
puppet.conf file and correct them, follow these steps:
- Find the line number in the error message.
- Go to the line # in
- Look for issues in the file, such as extra characters and missing brackets.
- If you can’t find an issue in the line number, create a hex dump to look for extra characters in the file.
- Correct the issue and save the file.
- Rerun the Puppet command.
If you get a parsing error, repeat steps 1-6.
Tips for preventing
puppet.conf parsing errors
To inspect and change configuration options in a node’s
puppet.conf file, we recommend using the
puppet config print and
puppet config set commands or the
puppet_conf task. The
puppet_conf task comes from the
puppetlabs-puppet_conf module. You don’t have to install the puppet_conf module separately because it comes with PE.
How can we improve this article?
Please sign in to leave a comment.