Puppet Interview Preparation Guide (2027)
Puppet interview prep in seven steps: agent run, resources, classes, Hiera, roles and profiles, environments, PDK testing, plus Puppet Core vs OpenVox.
To prepare for a Puppet interview, learn how a node turns facts into a compiled catalog, how to write classes and resources, how roles and profiles organise code, how Hiera separates data from code, and how to test modules with the PDK. Also know who ships Puppet now: Perforce sells Puppet Core, and OpenVox is the community fork.
This guide walks through the topics in the order interviewers usually raise them, with short code you should be able to write from memory. For a list of rapid-fire questions, use our top Puppet automation interview questions; this page is the study companion that explains the ideas behind them. Product facts were checked against Puppet and Vox Pupuli pages in November 2026.
Key takeaways
- Puppet is declarative: you describe the end state and the agent makes the node match it.
- Expect questions on resources, classes, defined types, facts, catalogs, environments, Hiera and the roles and profiles pattern.
- The PDK (Puppet Development Kit) is the official way to create and test modules; modules are shared on the Puppet Forge.
- Perforce launched Puppet Core as its vendor-backed build in February 2025. OpenVox, maintained by Vox Pupuli, is a soft fork that aims to stay compatible with Puppet.
- Senior candidates are asked how to structure code for many teams and how to roll out changes safely.
Where Puppet stands in 2026
Interviewers sometimes open with "Which Puppet do you run?" because the answer is no longer obvious. Perforce's Puppet Core blog post, dated February 19, 2025, describes Puppet Core as adding hardened binaries, SLAs for high and critical CVEs and a premium security compliance feature. The Puppet documentation currently labels its reference as Puppet Core 8.22.2. According to the Vox Pupuli project, OpenVox began as a Puppet mirror by Overlook InfraTech after Perforce stopped public packaging in late 2024, and the community now maintains it as a soft fork guided by a standards steering committee.
A good answer is neutral and practical. Say which build your last team used, why (support contract, licensing, or community packages), and that the language and module ecosystem are the same skills either way.
| Option | Maintained by | When teams choose it |
|---|---|---|
| Puppet Core | Perforce | They want vendor support, hardened builds and CVE SLAs |
| Puppet Enterprise | Perforce | They want the commercial console, orchestration and support |
| OpenVox | Vox Pupuli community | They want openly licensed community packages compatible with Puppet code |
Step 1: the agent run, explained simply
Most panels start here. Be able to describe the cycle in your own words:
- The agent on a node gathers facts about itself with Facter (OS, IP addresses, memory and so on).
- It sends those facts to the server and asks for a catalog.
- The server compiles a catalog for that node from the manifests, modules and Hiera data in the node's environment.
- The agent applies the catalog, changing only resources that differ from the desired state.
- It sends a report back describing what changed.
Follow-up questions usually test edge cases. What happens if compilation fails? The agent gets no new catalog, so nothing changes and the run is reported as failed. What does --noop do? It simulates the run and reports what would change without changing anything, which is useful before a risky deploy.
Step 2: resources and the language
A resource is the basic unit: a type, a title and attributes. You should be able to write this without notes:
package { 'nginx':
ensure => installed,
}
file { '/etc/nginx/nginx.conf':
ensure => file,
content => template('nginx/nginx.conf.erb'),
require => Package['nginx'],
notify => Service['nginx'],
}
service { 'nginx':
ensure => running,
enable => true,
}
Expect to explain the relationship metaparameters. require and before set order. notify and subscribe set order and also trigger a refresh, which for a service means a restart. The chaining arrows -> and ~> do the same thing in a different syntax. Puppet does not run resources in file order unless you tell it to, so a candidate who relies on line order will be corrected.
Other language points that come up: variables cannot be reassigned within a scope, resource titles must be unique per catalog, and duplicate declarations cause compile errors. Know the difference between a class (declared once per node, a singleton) and a defined type (a reusable block you can declare many times with different titles, such as one per virtual host).
Step 3: classes, parameters and modules
A module is a directory with a standard layout: manifests/, templates/, files/, data/ and spec/ for tests. A parameterised class looks like this:
class profile::web (
Integer $worker_processes = 2,
Boolean $enable_tls = true,
) {
class { 'nginx':
worker_processes => $worker_processes,
}
if $enable_tls {
include profile::tls
}
}
Know the two ways to declare a class. include can be called many times safely. Resource-like declaration (class { 'nginx': ... }) passes parameters but fails if the class is declared twice. Most style guides prefer include plus Hiera for parameters, which keeps declarations conflict-free.
Step 4: Hiera and automatic parameter lookup
Hiera is the key-value lookup system that keeps data out of code. A typical hiera.yaml defines a hierarchy from most specific to least specific:
version: 5
defaults:
datadir: data
data_hash: yaml_data
hierarchy:
- name: "Per node"
path: "nodes/%{trusted.certname}.yaml"
- name: "Per environment role"
path: "roles/%{facts.role}.yaml"
- name: "Common"
path: "common.yaml"
With automatic parameter lookup, a key such as profile::web::worker_processes: 4 in Hiera sets that class parameter without any code change. Interviewers like to ask why you would use trusted.certname rather than a plain fact for node-level data: trusted data comes from the node's certificate, so a compromised node cannot fake it the way it could fake an ordinary fact.
Secrets should not sit in plain YAML. Mention an encrypted backend such as hiera-eyaml or an external secrets lookup, and say that only the server holds the private key.
Step 5: roles and profiles
This pattern answers "how do you organise Puppet code for a large estate?" Component modules (often from the Forge) manage one technology. Profiles wrap component modules with your company's settings. A role is a business label, such as role::payment_api, that includes several profiles. Each node gets exactly one role.
class role::payment_api {
include profile::base
include profile::web
include profile::monitoring
}
The benefits to state: one place to change a technology choice, node classification reduced to a single class, and easy reasoning about what a node runs. The usual mistake is putting business logic in component modules, which makes upgrades from the Forge painful.
Step 6: environments and code deployment
Environments are separate directories of code, often mapped one to one with Git branches. A node in the development environment compiles its catalog from that branch, so you can test changes on a few nodes before merging. Many teams deploy environments with r10k or Code Manager (in Puppet Enterprise), driven by a Puppetfile that pins module versions. Be ready to explain why pinning matters: an unpinned Forge module can change under you and break production on the next run.
Step 7: testing and quality
The PDK creates modules with a standard layout and test scaffolding. Typical commands an interviewer expects you to know:
pdk new module mycompany_web
pdk new class mycompany_web::config
pdk validate
pdk test unit
pdk validate runs syntax and style checks. pdk test unit runs rspec-puppet tests that compile catalogs and assert on resources. For acceptance testing, teams spin up real machines or containers and apply the code. A senior answer adds a CI pipeline that runs validation and unit tests on every merge request and blocks merges on failure.
Practice questions with model answers
1. What is idempotency in Puppet?
Applying the same catalog repeatedly gives the same result. After the first successful run, later runs make no changes unless the node drifted. exec resources break this unless you guard them with creates, unless or onlyif.
2. When would you use an exec resource?
Only when no native type or Forge module does the job. Always guard it so it runs once, and prefer writing a custom type for anything you run often.
3. How do you find why a resource changes on every run?
Run the agent with --test --noop and read the diff. Common causes are templates with timestamps, an exec without a guard, or two resources fighting over the same file.
4. What are exported resources?
Resources declared on one node and collected on another through PuppetDB, for example web nodes exporting their addresses so the load balancer node can collect them into its configuration.
5. How do you roll out a risky change to 2,000 nodes?
Merge to a feature environment, move a canary group to it, run in noop, apply to the canary, watch reports and monitoring, then widen in stages. Keep the previous commit ready to roll back by reverting in Git.
6. How is Puppet different from Ansible?
Puppet usually runs an agent that pulls a compiled catalog on a schedule and enforces state continuously. Ansible usually pushes tasks over SSH when you run a playbook. Puppet's model suits long-lived servers that must not drift; Ansible's suits ad hoc orchestration and one-off changes.
7. What is PuppetDB used for?
It stores facts, catalogs and reports, which enables exported resources and lets you query the estate, for example to list every node with a given package version.
8. How do you keep secrets out of reports and logs?
Use the Sensitive data type so values are redacted in logs and reports, and store the values encrypted in Hiera.
9. A node reports "Could not find class profile::web". What do you check?
That the node is in the environment you expect, that the module is in that environment's Puppetfile and was deployed, that the file path matches the class name (profile/manifests/web.pp), and that there is no typo in the role. Most of these errors come from code deployed to one environment while the node points at another.
10. How do you explain your Puppet repository to a new team member?
Start from one node: show its role, the profiles that role includes, the Hiera files that set its parameters, and the component modules underneath. Following one real node from classification to catalog teaches the structure faster than a tour of directories.
A two-week study plan
| Days | Focus | Hands-on task |
|---|---|---|
| 1 to 3 | Agent run, facts, resources, relationships | Manage a web server with package, file and service resources |
| 4 to 6 | Classes, defined types, modules | Build a module with a defined type for virtual hosts |
| 7 to 9 | Hiera and roles and profiles | Move all parameters to Hiera and add two roles |
| 10 to 12 | Environments, Puppetfile, PDK tests | Add unit tests and run them in a CI pipeline |
| 13 to 14 | Mock interview | Explain your repo design out loud in ten minutes |
Puppet questions often come next to Ansible and Terraform questions, so read our scenario-based Puppet questions, the 70 Puppet interview questions and the DevOps interview hub. For hands-on configuration management practice with a trainer, see the Ansible course in Kharadi, Pune, also run live online, and the broader advanced Puppet questions.
FAQ
Is Puppet still worth learning in 2027?
Yes, if you target companies that run large fleets of long-lived servers. The concepts (desired state, idempotency, data separation) also carry over to other tools.
What is Puppet Core?
Perforce's vendor-backed build of Puppet, launched in February 2025, with hardened binaries and CVE SLAs according to the Puppet blog.
What is OpenVox?
A community-maintained soft fork of Puppet run by Vox Pupuli. It aims to stay compatible with Puppet code.
What is the roles and profiles pattern?
Profiles wrap component modules with your settings, and each node gets one role that includes the profiles it needs.
Why use Hiera?
To keep data such as ports, versions and per-environment settings out of code, so the same module works everywhere.
What does pdk validate do?
It runs syntax and style checks on a module before you run tests or commit.
How do I test Puppet code before production?
Run unit tests with the PDK, then use a separate environment and noop runs on canary nodes before a staged rollout.
Official references
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0