Puppet-katello how to/example

I’ve been trying to figure out how to setup a basic Katello install using the puppet-katello module. However after looking in every corner of the internet I’ve yet to come across an example of configuring Katello or even just Foreman with Puppet.

I found it reasonably quick to spin something up with foreman-installer --scenario katello, which I read uses the Puppet modules internally. This kind of tooling seems to go against the principals of configuration management. The second bullet point in this post sums it up quite well: http://thinlight.org/2017/07/29/foreman-and-puppet-5-the-hard-way/

In the end I sussed how to build Foreman using Puppet using the following code (may be helpful to future wanderers looking for a quick start)

class{'foreman':
  unattended            => true,
  ssl                   => false,
  locations_enabled     => false,
  organizations_enabled => false,
  admin_username        => 'admin',
  admin_password        => 'changeme',
  websockets_encrypt    => true,
  db_manage             => true,
  oauth_consumer_key    => 'foo',
  oauth_consumer_secret => 'wibble',
}

My current sticking point is that Class[katello] calls Class[candlepin] which sets manage_repo to false for the katello-candlepin repo. When I add class {'candlepin::repo': manage_repo => true } to my manifest it gives me a Duplicate Dependency error. I might file a bug for this if I get around to it.

I’m after some pointers to help me on my way and maybe some insight as to why things were done this way.