routes.yaml: Advanced plugin routing

The routes.yaml file overrides configuration settings involving indirector termini, and allows termini to be set in greater detail than puppet.conf allows.

The routes.yaml file makes it possible to use certain extensions to Puppet, most notably PuppetDB. Usually you edit this file only to make changes that are explicitly specified by the setup instructions for an extension you are trying to install.

routes.yaml allows you to configure a terminus to have a cache. The cache is simply another terminus used for quick retrieval of facts. When saving facts, Puppet always saves to the main terminus. When loading facts, Puppet loads first from the cache. If the requested value is not present in the cache, Puppet instead loads from the main terminus.


The routes.yaml file is located at $confdir/routes.yaml by default. Its location is configurable with the route_file setting.

The location of the confdir depends on your operating system. See the confdir documentation for details.


    terminus: puppetdb
    cache: yaml


The routes.yaml file is a YAML hash.

Each top level key is the name of a run mode (server, agent, or user), and its value is another hash.

Each key of the second-level hash is the name of an indirection, and its value is another hash.

The only keys allowed in the third-level hash are terminus and cache. The value of each of these keys is the name of a valid terminus for the indirection named above.