-3

I'm trying to setup a puppet master with hiera.

When I try "puppet agent --test" on the mongo node I get this error.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'mongo.example.com, mongo.example, mongo' on node mongo.example.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

I have:

/etc/puppet/hieradata/production/common.yaml /etc/puppet/hieradata/production/mongo.example.com.yaml

this is my hiera.yaml

---

:backends:
  - yaml

:hierarchy:
  - "%{::fqdn}"
  - common

:yaml:
   :datadir: /etc/puppet/hieradata/%{environment}/
ewwhite
  • 197,159
  • 92
  • 443
  • 809
Alex
  • 9
  • 2

1 Answers1

4

You have to define a node in $PUPPETDIR/manifests/site.pp (or node.pp, as this is usually imported from site.pp and is meant to keep node defs).

Sven
  • 98,649
  • 14
  • 180
  • 226
  • 1
    This. Although you should no longer [import](https://docs.puppetlabs.com/puppet/latest/reference/lang_import.html#deprecation-notice) manifest files. – Felix Frank Apr 21 '15 at 11:55