Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,19 @@ Configures the puppet master to use PuppetDB as the facts terminus. *WARNING*: t
puppet_confdir => '/etc/puppet'
}

The optional parameter routes can be used to specify a custom route configuration. For example to configure routes for masterless puppet.

class { 'puppetdb::master::routes':
routes => {
'apply' => {
'facts' => {
'terminus' => 'facter',
'cache' => 'puppetdb_apply',
}
}
}
}

**puppetdb::master::storeconfigs**

Configures the puppet master to enable storeconfigs and to use PuppetDB as the storeconfigs backend.
Expand Down
6 changes: 0 additions & 6 deletions files/routes.yaml

This file was deleted.

12 changes: 10 additions & 2 deletions manifests/master/routes.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
# details.
class puppetdb::master::routes(
$puppet_confdir = $puppetdb::params::puppet_confdir,
$routes = {
'master' => {
'facts' => {
'terminus' => 'puppetdb',
'cache' => 'yaml',
}
}
}
) inherits puppetdb::params {

# TODO: this will overwrite any existing routes.yaml;
Expand All @@ -10,7 +18,7 @@
# to parse the yaml file and rewrite it, dealing with indentation issues etc.
# I don't think there is currently a puppet module or an augeas lens for this.
file { "${puppet_confdir}/routes.yaml":
ensure => file,
source => 'puppet:///modules/puppetdb/routes.yaml',
ensure => file,
content => template('puppetdb/routes.yaml.erb'),
}
}
3 changes: 3 additions & 0 deletions templates/routes.yaml.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file was automatically generated by the puppetdb module.

<%= @routes.to_yaml %>