Ask Your Question
0

PuppetDB Exported Resources in Masterless Puppet

asked 2014-07-28 04:26:08 -0500

Gary Steven gravatar image

I am trying to get PuppetDB (2.1.0) and exported resources working in masterless mode and it does not appear to be working as expected. I am trying to collect resources on all my hosts and export them to a centralized server.

This is working as expected in a Master / Agent configuration however I have a requirement to make this work in a masterless configuration.

I can see the resources in PuppetDB when I query the resource but it won't export the resource from other machines only itself.

First question can this be done in masterless puppet mode (puppet apply)?

Any and all help is greatly appreciated.

Scenario

  • Server A puppet apply collects resource
  • Server B puppet apply collects resource
  • Server C puppet apply collects and exports resources

Outcome

Server C creates the file for server C only

Expected Outcome

Server C creates 3 files one for each server

Quick and dirty Sample

class foo (
  $export = false
) {

    @@file { "/tmp/${::fqdn}":
      ensure  => present,
      content => 'foo',
      tag     => 'testing'
    }

    if $export {
      File << | tag == 'testing' | >>
    }

}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-30 03:21:29 -0500

Gary Steven gravatar image

updated 2014-07-30 03:22:37 -0500

Removing the following from my routes.yaml appears to have solved the problem

  resource:
    terminus: ral
    cache: puppetdb
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-07-28 03:37:14 -0500

Seen: 636 times

Last updated: Jul 30 '14