ConfDroid Puppet Modules - confdroid_resources

Published: (February 12, 2026 at 07:10 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Why this module exists

Rocky Linux (and other RHEL derivatives) rely on YUM/DNF repositories to provide software packages.

Many useful packages — debugging tools, monitoring agents, additional utilities, and more — live outside the base OS repositories and are only available through EPEL (Extra Packages for Enterprise Linux).

In Puppet, repository definitions are singletons: you can only declare a yumrepo resource once per module & catalog. Declaring the same repository multiple times (e.g., in different modules that depend on EPEL) causes a duplicate resource conflict and catalog compilation failure.

The cleanest solution is to:

  • Define important shared repositories once, in a central place
  • Include that central definition in every node’s catalog
  • Let other modules simply assume the repository is already present

That central place is confdroid_resources.

How it works

The module declares the most commonly needed repositories (starting with EPEL) in a controlled, idempotent way.

Because these repositories are declared only once and included globally, downstream modules can safely install packages that depend on them without worrying about duplication errors.

You can also enable or disable individual repositories via class parameters or Hiera/Foreman data — without touching the rest of your codebase.

Typical usage pattern

Include confdroid_resources in every node’s catalog (usually via a base profile, site.pp, or Foreman host group / global classes):

include confdroid_resources

If a host should not have the repository enabled, set the parameter $rs_enable_epel to 0.

Other modules can now safely install packages from EPEL (or other managed repos):

package { 'htop':
  ensure  => installed,
  require => Class['confdroid_resources'],
}

Or, simply declare the requirement in your module:

require confdroid_resources

This ensures that the confdroid_resources module is applied first. No need to declare yumrepo { 'epel': … } again — it’s already managed.

Features

  • Installs and configures EPEL by default
  • Supports enabling/disabling repositories via parameters
  • Idempotent and conflict‑free design
  • Clean separation of concerns: shared repos live in one place
  • Works on Rocky Linux 9, AlmaLinux 9, RHEL 9 derivatives

Planned additions

  • Support for additional popular repositories (PowerTools/CRB, RPM Fusion, etc.)
  • GPG key management
  • More granular enable/disable controls per repo

Getting started

Add the module to your environment (via the ConfDroid Forge or by cloning the repo), then include it in your base profile or node classification:

# Example in a base profile class
class profile::base {
  include confdroid_resources
}

That’s it — EPEL (and any future shared repos) will be available everywhere, without duplication headaches.

Happy automating! 🚀

Feedback / feature requests:

0 views
Back to Blog

Related posts

Read more »

Cast Your Bread Upon the Waters

!Cover image for Cast Your Bread Upon the Watershttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-t...