Wednesday, September 25, 2019

Puppet agent throws: ...Unknown resource type: 'anchor' (file: ...

PROBLEM:
puppet agent -t throws this error:
RDBMS [root@rdb1210 ~]# puppet agent -t
Notice: Local environment: 'production' doesn't match server specified node environment 'r10k', switching agent to 'r10k'.
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: 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, Unknown resource type: 'anchor' (file: /etc/puppetlabs/code/environments/r10k/site/profile/manifests/linode3/linode3.pp, line: 2, column: 4) on node rdb1210.lpcnextlight.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

SOLUTION:
On the Puppet Master, install puppetlabs-stdlib.  For example:
puppet module install puppetlabs-stdlib
puppet agent -t

Adding it to the Puppetfile also works.

Then on the node, try running the agent again:  
puppet agent -t

No comments:

Post a Comment