ConfDroid Puppet Modules - Puppet

Published: (February 11, 2026 at 10:55 AM EST)
5 min read
Source: Dev.to

Source: Dev.to

12ww1160

Deep Dive into confdroid_puppet: The Core Module for Your Puppet Setup

In this ongoing series on the ConfDroid Puppet modules, we’re taking a closer look at confdroid_puppet — the foundational piece that powers the entire ecosystem. If you’re building or managing a Puppet environment on modern Linux systems, this module simplifies the setup of Puppet masters, agents, and essential supporting tools. Let’s explore what it does, how it works, and why it’s a must‑have for streamlined automation.


What is confdroid_puppet?

The confdroid_puppet module is designed to handle the core infrastructure for a Puppet environment. It focuses on configuring Puppet servers (masters) and agents, while integrating seamlessly with Foreman as your External Node Classifier (ENC). Built specifically for Puppet Core 8 and Rocky Linux 9 (or similar Enterprise Linux 9 derivatives like AlmaLinux or RHEL), it ensures a reliable, secure setup right out of the box.

Important Note – Always test this module in a lab environment first. It rewrites configurations like puppet.conf based on parameters, so it could overwrite existing manual setups. Production caution is key!

The module does not install Foreman itself — it assumes you already have it running (see our earlier post on Installing Puppet with Foreman). It only takes care of the Puppet side, making sure everything communicates smoothly.


Key Features

Core Components (Always Included)

ComponentWhat it does
Puppet Server (Master)If the node’s FQDN matches the value of pt_pm_fqdn, the module installs Puppet Server, rewrites puppet.conf with optimized settings, manages code environments, handles SSL certificates, starts the puppetserver service, and configures Foreman integration (node_terminus = exec).
Puppet AgentInstalls the agent packages on all nodes (including the master), points puppet.conf to the master, manages certificate signing, sets run intervals (default 1800 s), and ensures the puppet service is running.
Firewall RulesOpens required ports (e.g., TCP 8140 on the master). Controlled by manage_firewall (default true). Requires the puppetlabs/firewall module.
SELinux ManagementApplies proper SELinux contexts (puppet_etc_t for /etc/puppetlabs/, puppet_log_t for logs, etc.). Toggle with manage_selinux (default true).
Directories, Files & ServicesCreates and manages all necessary paths, files (with correct permissions), and services for a smooth operation.

Optional Add‑Ons

  • PuppetDB – Enable with enable_puppetdb (default false). Sets up a centralized store for facts, catalogs, and reports on the node defined by pt_puppetdb_fqdn. Supports PostgreSQL as a backend (external DB setup required) and includes log‑rotation (pt_pptdb_log_max_age).
  • r10k Service – Enable with enable_r10k (default false). Installs r10k, creates /etc/puppetlabs/r10k/r10k.yaml, and uses a Puppetfile to pull modules from a Git repo (r10k_remote). Ideal for managing multiple environments dynamically.
  • r10k Webhook Listener – Enable with enable_webhook (default false). Adds a listener for Git push events (e.g., from GitLab), validates signatures, and triggers r10k deploy. Supports HTTP/HTTPS and fits GitOps workflows.

These features make confdroid_puppet the backbone for all other ConfDroid modules, ensuring shared resources like firewalls and SELinux are handled consistently.


How to Use It

Via site.pp or nodes.pp

include confdroid_puppet  # Note: The module uses underscores in its name to avoid issues with r10k

Through Foreman

  1. Add the module to your Puppet master’s module path (e.g., via r10k or a Git clone).
  2. Import it into Foreman.
  3. Assign confdroid_puppet::params to your nodes or host groups.
  4. Override parameters such as pt_pm_fqdn to designate your master – nodes matching this become servers; all others become agents.

Once deployed:

  • Agents connect securely via SSL/TLS (you’ll need to sign them manually once at the master or configure autosign – see Puppet with Foreman Host Registration).
  • Masters compile catalogs and serve them.
  • Optional tools like r10k automate module updates.

Security and Troubleshooting Tips

Built‑in Security

  • SSL/TLS for all communications, with Puppet CA handling certificates.
  • Restricted firewall access (managed automatically).
  • SELinux isolation to prevent unauthorized access.

Common Issues & Fixes

SymptomPossible CauseFix
Agent connections failPort 8140 blocked or manage_firewall disabledVerify the port is open on the master and enable manage_firewall.
Certificate problemsCA directory missing or corrupted (/etc/puppetlabs/puppet/ssl/ca/)Re‑initialize the CA or clean up stale certificates.
ENC errorsForeman unreachable or SSL certs invalidCheck Foreman URL, network connectivity, and certificate validity.
r10k failuresGit access/credentials incorrectConfirm the Git remote URL, SSH keys, or HTTP credentials.
SELinux denialsMissing contexts on Puppet filesRun restorecon -R /etc/puppetlabs or adjust SELinux policies.
Log locationsUnsure where to lookMaster logs: /var/log/puppetlabs/puppetserver/
Agent logs: /var/log/puppetlabs/puppet/

Happy automating!

Why Choose confdroid_puppet?

This module keeps things opinionated, secure, and efficient — tailored for Rocky 9 and Puppet 8, with Foreman in mind. It’s the perfect starting point for the ConfDroid Forge ecosystem, where all modules are tested, documented, and community‑driven.

  • Source code:
  • Deepwiki documentation:

What’s next?

We’ll explore another ConfDroid module and see how it builds on this foundation.

Got questions or ideas?

Head to the feedback portal: . Let’s keep automating smarter! 🚀


Support the Author

If you found this post helpful, you can support me:

Buy Me a Coffee

Hetzner Referral

Substack

ConfDroid Feedback Portal


0 views
Back to Blog

Related posts

Read more »

Friday Five — February 13, 2026

Red Hat Summit Registration Don't forget to register for Red Hat Summit. Registration is now open for Red Hat Summit—heading to Atlanta, Georgia, in 2026—and t...