Top Puppet Automation Interview Questions (2027)
48 Puppet interview questions with answers: manifests, Hiera 5, roles and profiles, PDK, Puppet 8 changes, Puppet Core licensing, OpenVox and scenarios.
Puppet automation interview questions check whether you can describe a desired system state in Puppet code, deliver it to many nodes safely, and keep those nodes from drifting. Expect questions on manifests, classes, modules, Hiera, the agent and server model, certificates, environments, testing with PDK, and how Puppet's ownership and licensing changed after Perforce bought it.
This page is the main Puppet interview guide on our blog. It has 48 questions with direct answers, grouped by experience level, then a scenario section. Facts about versions and licensing were checked against Puppet's and Perforce's own pages in November 2026.
Key takeaways
- Puppet is declarative: you describe the end state of a resource and Puppet works out how to reach it. Be ready to contrast that with Ansible's task-based playbooks.
- Know the agent run: facts go to the server, the server compiles a catalog, the agent applies it and sends a report.
- Hiera 5 separates data from code. The roles and profiles pattern separates business intent from technical implementation.
- Puppet 8 turned strict mode on by default, stopped collecting legacy facts and dropped the bundled Hiera 3 component. Old code often breaks on these.
- Perforce completed its acquisition of Puppet in May 2022. From late 2024 new Puppet binaries moved to a private repository as Puppet Core, free for up to 25 nodes under a EULA. The community fork OpenVox, run by Vox Pupuli, continues an open source build.
How to use this guide
| Your level | Start with | Practise |
|---|---|---|
| Fresher | Questions 1 to 16 | Write a manifest that installs a package, manages its config file and keeps the service running, then run it with puppet apply |
| 2 to 5 years | Questions 17 to 32 | Build a module with PDK, add Hiera data, run unit tests |
| Senior | Questions 33 to 42 | Design environments with r10k or Code Manager, plan a Puppet 7 to 8 upgrade |
| Everyone | Scenarios 43 to 48 | Explain symptom, cause, fix and prevention out loud |
Other pages in this series take different angles: Puppet questions for freshers, advanced Puppet questions, scenario-based Puppet questions and a Puppet interview preparation plan.
Freshers: Puppet fundamentals (questions 1 to 16)
1. What is Puppet?
Puppet is a configuration management tool. You write code that describes how systems should be configured (packages, files, services, users) and Puppet enforces that state on each node, correcting drift on every run. It is now owned by Perforce.
2. What does declarative mean in Puppet?
You state the desired result, such as "nginx is installed and running", rather than the commands to get there. Puppet checks the current state and only changes what differs. Running the same code twice leaves the system unchanged the second time, which is called idempotence.
3. What is a resource?
A resource is the basic unit of Puppet code: one thing on the system with a type, a title and attributes.
package { 'nginx':
ensure => installed,
}
service { 'nginx':
ensure => running,
enable => true,
require => Package['nginx'],
}
4. Name some core resource types.
package, file, service, user, group, exec and cron are the ones most interviews ask about. Many more come from modules on the Puppet Forge.
5. What is a manifest?
A manifest is a file of Puppet code with the .pp extension. The main manifest for an environment usually lives at manifests/site.pp and contains node definitions or class assignments.
6. What is a class?
A class is a named block of Puppet code you can apply to nodes. Classes can take parameters, which lets the same class configure different nodes differently. You declare a class with include or with resource-like syntax when passing parameters.
7. What is a module?
A module is a directory with a fixed layout that packages related classes, defined types, files, templates, facts and tests. Typical folders are manifests, files, templates, lib, data and spec. Modules are how Puppet code is shared and reused.
8. What is Facter?
Facter collects facts about a node: operating system, IP addresses, memory, hostname and so on. Facts are sent to the server and used in code, for example $facts['os']['family']. In Puppet 8, legacy flat facts such as $osfamily are no longer collected, so use the structured $facts hash.
9. What is a catalog?
A catalog is the compiled, node-specific list of resources and their relationships. The server builds it from code, facts and Hiera data. The agent then applies the catalog to the node.
10. Describe a Puppet agent run.
The agent collects facts and sends them to the Puppet server. The server compiles a catalog for that node. The agent applies the catalog, changing only what is out of line, and sends a report back. By default the agent service repeats this every 30 minutes, set by runinterval.
11. What is the difference between puppet apply and puppet agent?
puppet apply compiles and applies a manifest locally with no server. puppet agent talks to a Puppet server, which compiles the catalog. puppet agent -t triggers a single test run in the foreground with verbose output.
12. How do agents and the server trust each other?
Through certificates. On first contact the agent creates a key and sends a certificate signing request. The server's certificate authority signs it, manually with puppetserver ca sign --certname node.example.com or through an autosign policy. After that, every connection uses mutual TLS.
13. What does ordering mean in Puppet?
Resources are applied in the order they appear in the manifest unless relationships say otherwise. Use require, before, notify and subscribe, or chaining arrows (-> and ~>), to make dependencies explicit. notify and subscribe also trigger a refresh, such as restarting a service when its config file changes.
14. What is a template?
A template generates file content from variables. Puppet supports EPP templates (Embedded Puppet, .epp) and ERB templates (Embedded Ruby, .erb). EPP is generally preferred for new code because it uses Puppet language syntax.
15. What is the Puppet Forge?
The Forge is the public repository of Puppet modules. Teams use modules from it for common software instead of writing their own. Check maintenance status, supported operating systems and Puppet version support before using one.
16. Why use exec sparingly?
exec runs arbitrary commands, which Puppet cannot check for state by itself. Without creates, onlyif, unless or refreshonly, it runs every time and breaks idempotence. Prefer a real resource type when one exists.
2 to 5 years: modules, data and testing (questions 17 to 32)
17. What is Hiera?
Hiera is Puppet's key-value lookup system for configuration data. It keeps values such as package versions or server lists out of code. Lookups follow a hierarchy, so a node-specific value can override an OS-level value, which overrides a common default.
18. What does a Hiera 5 config look like?
---
version: 5
defaults:
datadir: data
data_hash: yaml_data
hierarchy:
- name: "Per-node data"
path: "nodes/%{trusted.certname}.yaml"
- name: "Per-OS family"
path: "os/%{facts.os.family}.yaml"
- name: "Common data"
path: "common.yaml"
Hiera 5 supports three layers: global, environment and module. The Hiera documentation describes each.
19. What is automatic parameter lookup?
When a class is declared without a value for a parameter, Puppet looks up classname::parametername in Hiera. That lets you keep classes generic and set values in data. You can test lookups with puppet lookup.
20. Explain the roles and profiles pattern.
Profiles wrap component modules into a technology stack, such as "web server with TLS". Roles describe a node's business purpose, such as "storefront web node", and include only profiles. Each node gets exactly one role. This keeps node classification simple and puts site-specific logic in profiles.
21. What is a defined type?
A defined type is a reusable block of resources that can be declared many times with different titles, like a virtual host. A class can be declared only once per node; a defined type can be declared many times.
22. What are data types in the Puppet language?
Puppet 4 and later support typed parameters such as String, Integer, Boolean, Array[String], Optional[String] and Enum['present','absent']. Typing parameters catches bad data at compile time instead of on the node.
23. What is PDK?
The Puppet Development Kit creates modules and classes from templates and runs validation and tests. Common commands are pdk new module, pdk new class, pdk validate and pdk test unit.
24. How do you unit test Puppet code?
With rspec-puppet, usually through PDK. Tests compile a catalog for given facts and parameters and assert that resources exist with the right attributes. They do not change a real system. Use acceptance tests on disposable machines for end-to-end checks.
25. How do you validate syntax before committing?
Run puppet parser validate on manifests and puppet-lint for style. pdk validate runs these and more. Put them in a pre-commit hook and in CI so broken code never reaches the server.
26. What are environments?
Environments are isolated sets of code and data, often mapped to Git branches such as production and development. Agents request a specific environment, so you can test changes on a few nodes before merging to production.
27. What are r10k and the Puppetfile?
The Puppetfile lists the modules and versions an environment needs. r10k reads a control repository, creates one environment per branch and installs the modules listed in each Puppetfile. Puppet Enterprise provides Code Manager for the same job.
28. What is PuppetDB?
PuppetDB stores facts, catalogs and reports from every node. It powers exported resources and lets you query the estate, for example to list every node running a certain OS version.
29. What are exported resources?
A node can export a resource description to PuppetDB, and other nodes collect it. A common example: every web node exports a load balancer member entry, and the load balancer node collects them all. Exported resources require PuppetDB.
30. How do you handle secrets in Puppet?
Do not store plaintext secrets in Git. Use hiera-eyaml for encrypted values in Hiera, or look up secrets at run time from a vault through a module or deferred function. Mark values as Sensitive so they are redacted in logs and reports.
31. What is noop mode?
Noop mode simulates a run and reports what would change without changing anything. Use puppet agent -t --noop to preview a risky change on a production node.
32. What is Bolt?
Bolt is Puppet's task runner for ad hoc and orchestrated actions over SSH or WinRM, without needing an agent. It runs tasks and plans, and is useful for one-off jobs such as restarting a service across a group of nodes.
Senior: architecture, upgrades and licensing (questions 33 to 42)
33. What changed in Puppet 8 that could break existing code?
According to the Puppet 8 release notes: strict mode is on by default (strict defaults to error and strict_variables to true), legacy facts are no longer collected, the bundled Hiera 3 component was removed, PSON support was removed, and agent packages vendor Ruby 3.2. Run the legacy facts puppet-lint plugin and test in a branch environment before upgrading agents.
34. How would you plan a Puppet 7 to 8 upgrade?
Inventory module compatibility, fix legacy fact use and undefined variables, convert any Hiera 3 backends to Hiera 5, upgrade the server side first, then roll agents out in waves, watching reports for failed runs. Keep a rollback plan for each wave.
35. What happened to open source Puppet?
Perforce completed its acquisition of Puppet in May 2022. In late 2024 Perforce moved new Puppet binaries to a private repository. Its current product, Puppet Core, can be installed free on up to 25 nodes after accepting a EULA on the Puppet Forge, with MFA and an API key required to download packages. Larger use needs a commercial licence. Puppet's help site listed Puppet Core 8.22.2 in November 2026.
36. What is OpenVox?
OpenVox is a community fork of Puppet maintained by Vox Pupuli. It started as a packaging mirror by Overlook InfraTech after Perforce ended public packaging, and calls itself a soft fork that aims to stay compatible with Puppet. Teams that want fully open source builds evaluate it as a replacement.
37. How would you scale Puppet for thousands of nodes?
Add compile servers behind a load balancer, keep a single certificate authority, tune JRuby instances and heap on Puppet Server, size PuppetDB and its PostgreSQL database, and spread agent runs with splay. Watch compile times and failed runs as leading signals.
38. Puppet or Ansible: how do you choose?
Puppet suits long-lived servers where continuous drift correction and a central report history matter. Ansible suits push-based workflows, orchestration and teams that prefer agentless SSH. Many shops run both. See our configuration management tools comparison and the infrastructure as code tools guide.
39. How do you put Puppet code through CI/CD?
On every merge request: lint, parser validation, unit tests and a catalog compile for representative nodes. After merge, r10k or Code Manager deploys the branch to an environment. Promote to production by merging, and canary changes on a small node group first.
40. How do you detect and handle drift?
Every agent run corrects drift for managed resources and reports what it changed. Unexpected corrective changes in reports point to someone changing systems by hand. Unmanaged resources do not drift-correct, so decide which ones Puppet should own.
41. How do you organise code for many teams?
One control repository, component modules versioned separately, profiles owned by platform teams, and clear code review rules. Use CODEOWNERS or equivalent so each module has a reviewer from its owning team.
42. What metrics would you track for a Puppet estate?
Run success rate, nodes not reporting, catalog compile time, corrective changes per run, and agent version spread. These show health, drift and upgrade progress.
Scenario questions (questions 43 to 48)
43. Agents report "certificate verify failed" after a server rebuild.
The rebuilt server likely has a new CA, so agents no longer trust it. Restore the original CA from backup if possible. Otherwise clean the agent SSL directories and re-sign every node. Prevention: back up the CA directory and treat it as critical data.
44. A service restarts on every agent run.
Something keeps changing: often an exec without a guard, or a template that renders differently each time (a timestamp, unsorted hash). Run with --noop and read which resource changes, fix it so it is idempotent, and the restarts stop.
45. Code works in development but fails to compile in production.
Check differences in Hiera data, Puppetfile module versions and environment-level settings. A missing key fails hard under strict mode. Compile a catalog for a production node in CI to catch this before merge.
46. After upgrading to Puppet 8, many manifests fail with unknown variable errors.
Strict variables are now on by default and legacy facts are gone. Replace flat facts with $facts hash lookups, define or default the variables, and use the legacy facts lint plugin to find the rest.
47. Someone pushed a bad change and 2,000 nodes are failing runs.
Revert the commit and redeploy the environment. Failed runs usually leave nodes in their last good state, so check whether any resources were partly applied. Afterwards, add a canary environment and required CI compile checks.
48. Your company's licence covers fewer nodes than you run, and leadership asks for options.
List the options with facts: buy more Puppet licences, evaluate OpenVox as a compatible open source build, or move some workloads to another tool. Test OpenVox on a non-production environment first and check module compatibility. Present costs and risks; leadership makes the call.
How to prepare
Install an agent and server in two virtual machines, write a module with PDK, wire up Hiera and run tests. Read the Puppet language summary and the Puppet 8 release notes. Since many teams pair Puppet with Ansible, our production Ansible playbooks guide is a useful companion, and the broader 200+ DevOps interview questions covers the rest of the stack.
Our DevOps training in Pune covers configuration management alongside CI/CD, containers and cloud, in a Kharadi classroom or live online. For an agentless tool, see the Ansible training.
Frequently asked questions
Is Puppet still used in 2027?
Yes, especially on large fleets of long-lived servers. Perforce sells Puppet Core and Puppet Enterprise, and the OpenVox fork continues an open source build.
Is Puppet still open source?
The historical source remains under Apache 2.0, but Perforce publishes new binaries privately as Puppet Core, free up to 25 nodes under a EULA. OpenVox is the community open source continuation.
What is the difference between Puppet and Ansible?
Puppet is agent-based and continuously enforces a declared state. Ansible is usually agentless and pushes changes over SSH when you run a playbook.
What is Hiera used for?
Hiera stores configuration data outside code, with a hierarchy that lets node or OS values override common defaults.
What breaks when upgrading to Puppet 8?
Code relying on legacy facts, undefined variables (strict mode is on), Hiera 3 backends and PSON.
What is the roles and profiles pattern?
Profiles combine component modules into technology stacks; roles combine profiles into a node's business purpose. Each node gets one role.
Which Puppet command runs the agent once?
puppet agent -t runs a single foreground test run. Add --noop to preview changes.
Official references
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0