
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































This comprehensive exam is based on the official Puppet certification exam outline and covers all required domains: Classification, Troubleshooting, Module Authoring, Concepts, Language, Orchestration and Tasks, Environments, and Administration.
Primary reference materials include: Puppet official documentation, Puppet Language Style Guide, Puppet Certified Professional Exam Details, and Puppet Forge module standards.
Question 1
Which component in the Puppet architecture is responsible for compiling node catalogs? A) Puppet Agent B) Puppet Master
C) Facter D) PuppetDB
Answer: B
Explanation: The Puppet Master receives facts from the agent, compiles the catalog based on manifests and modules, and returns it to the agent for enforcement.
Reference: Puppet Concepts – Architecture Overview
Question 2
In Puppet's declarative model, what does idempotency guarantee?
A) Resources are applied in alphabetical order B) The same catalog can be applied repeatedly without changing the system after convergence C) All resources are applied simultaneously D) Only the first run makes changes, subsequent runs are ignored
Answer: B
Question 4
What is the default file extension for an Embedded Puppet (EPP)
template? A) .erb B) .epp C) .pp D) .tmpl
Answer: B
Explanation: EPP templates use the .epp file extension and are parsed by the Puppet parser, allowing embedded Ruby code within Puppet DSL.
Reference: Puppet Language – EPP Templates
Question 5
Which relationship metaparameter ensures that a resource runs only after another resource has successfully completed? A) notify B) before
C) require D) subscribe
Answer: C
Explanation: The require metaparameter creates a hard dependency, guaranteeing that the required resource runs first. The depending resource will not be applied until the required resource succeeds.
Reference: Puppet Language – Relationships and Ordering
Question 6
In a Puppet module, where should the main class be defined by convention? A) manifests/init.pp B) manifests/main.pp C) lib/puppet/functions/ D) manifests/classes.pp
Answer: A
Question 8
Which of the following is NOT a standard directory in a Puppet module layout? A) manifests/ B) files/ C) scripts/ D) templates/
Answer: C
Explanation: The standard Puppet module layout includes manifests/, files/, templates/, lib/, and tests/ directories. There is no standard scripts/ directory.
Reference: Module Authoring – Module Structure
Question 9
Which language construct in Puppet allows you to assign a value to a variable based on multiple conditions?
A) if/else B) case statement C) selector D) unless
Answer: C
Explanation: The selector is an expression that returns a value based on matching a control expression against multiple cases. It is used to assign values conditionally.
Reference: Puppet Language – Selectors
Question 10
What is the default interval at which a Puppet agent applies configurations when running as a daemon? A) 15 minutes B) 30 minutes C) 60 minutes D) 90 minutes
Question 12
What is the purpose of the puppet agent --test command?
A) Run the agent once in the foreground with verbose output B) Test the master configuration C) Validate module syntax D) List all signed certificates
Answer: A
Explanation: puppet agent --test runs the Puppet agent once in the foreground with verbose output, useful for manual testing and troubleshooting.
Reference: Puppet Administration – Agent Commands
Question 13
Which of the following file resource attributes specifies the numerical file mode (permissions)?
A) group B) owner C) mode D) permission
Answer: C
Explanation: The mode attribute in a file resource specifies the file permissions using either symbolic notation (e.g., 'u=rw,go=r') or numeric notation as a quoted string (e.g., '0644').
Reference: Puppet Language – File Resource
Question 14
What does the require metaparameter do?
A) Causes the resource to refresh if the dependent resource changes B) Establishes that the referenced resource must be applied before the current resource C) Notifies the dependent resource when changes occur D) Applies both resources simultaneously
Reference: Puppet Language – Defined Types
Question 16
In the Puppet language, what does the ~> operator represent?
A) Require relationship B) Before relationship C) Notify relationship (refresh) D) Subscribe relationship
Answer: C
Explanation: The ~> chaining operator creates a notify relationship, sending a refresh event to the right-hand resource if the left-hand resource changes.
Reference: Puppet Language – Chaining Operators
Question 17
What is the primary function of the puppet cert list command?
A) List all installed modules B) List all certificate signing requests awaiting approval C) List all active nodes D) List all Hiera data sources
Answer: B
Explanation: puppet cert list displays all certificate signing requests (CSRs) that are awaiting approval from the Puppet master administrator.
Reference: Puppet Administration – Certificate Management
Question 18
Which of the following is NOT a valid data type in the Puppet language? A) String B) Integer C) Hash D) Tuple with named fields (Struct)
Question 20
Which of the following is a correct way to declare a class with parameters? A) class myclass { $param = $value } B) class myclass($param = $value) { } C) class myclass($param) { $value = $param } D) class myclass params => $value
Answer: B
Explanation: Class parameters are defined in parentheses after the class name, with optional default values. Example: class myclass($param = 'default') { }.
Reference: Puppet Language – Classes
Question 21
What is the purpose of the puppet parser validate command?
A) Validate Hiera syntax B) Validate Puppet manifest syntax C) Validate module dependencies D) Validate certificate chains
Answer: B
Explanation: puppet parser validate checks Puppet manifest files (.pp) for correct syntax without executing them, helping catch errors before deployment.
Reference: Puppet Administration – Validation Commands
Question 22
Which metaparameter would you use to ensure that a service restarts only when a related file resource changes? A) require B) before C) subscribe D) notify
Question 24
What does the default keyword do in a case statement or selector?
A) Sets a fallback value when no other cases match B) Defines the primary case C) Specifies the default environment D) Indicates the default modulepath
Answer: A
Explanation: In both case statements and selectors, default provides a fallback value or action when none of the specified cases match the control expression.
Reference: Puppet Language – Case and Selector
Question 25
Which command installs the Puppet master on a CentOS/RHEL system?
A) apt-get install puppet-master B) yum install puppet-server C) yum install puppet-master D) apt-get install puppet-server
Answer: B
Explanation: On CentOS/RHEL systems, the command is yum install puppet-server. On Debian/Ubuntu, the command is apt-get install puppetmaster.
Reference: Puppet Administration – Installation
Question 26
What is the default port used by the Puppet master for agent communication? A) 8080 B) 8140 C) 8443 D) 443