




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This exam prepares DevOps and automation professionals for the Puppet Professional certification by covering Puppet architecture, manifests, modules, classes, Hiera configuration, resource abstraction, orchestration, CI/CD integration, environment management, and troubleshooting. The practice exam provides real-world configuration scenarios, code analysis questions, and infrastructure automation cases.
Typology: Exams
1 / 111
This page cannot be seen from the preview
Don't miss anything!





























































































Question 1. Which component stores compiled catalogs for agents in a Puppet infrastructure? A) PuppetDB B) Puppet Server C) Code Manager D) Hiera Answer: B Explanation: The Puppet Server (formerly Puppet Master) compiles manifests into catalogs and serves them to agents. Question 2. What protocol does a Puppet agent use to communicate securely with the master? A) FTP B) HTTP C) HTTPS with SSL/TLS D) SSH Answer: C Explanation: Agents connect to the master over HTTPS, employing SSL/TLS for encryption and authentication. Question 3. In the PKI workflow, which file contains the agent’s public key sent to the master for signing? A) ca.crt
B) cert.pem C) request.pem D) privatekey.pem Answer: C Explanation: The CSR (certificate signing request) file, usually named request.pem, holds the public key the master signs. Question 4. Which command revokes a compromised certificate on the Puppet master? A) puppet cert clean puppet cert clean removes the certificate and adds it to the CRL, effectively revoking it. Question 5. What is the primary purpose of the Puppet “environment” feature? A) To configure firewall rules B) To separate code bases for different stages (e.g., dev, prod) C) To manage user permissions
Explanation: The namevar (often the title) is the key attribute that Puppet uses to uniquely identify a resource. Question 8. Which concept ensures that applying the same manifest multiple times does not change the system after the first run? A) Convergence B) Idempotency C) Declarativity D) Compilation Answer: B Explanation: Idempotency means Puppet only makes changes required to reach the desired state, avoiding repeated modifications. Question 9. Which tool gathers system information for use in Puppet catalogs? A) hiera B) facter C) r10k D) mcollective Answer: B Explanation: Facter collects facts about the node, which the master uses during catalog compilation.
Question 10. During catalog compilation, which data source is consulted last for a lookup? A) Core facts B) Hiera data C) Node definition in site.pp D) Puppet Server settings Answer: B Explanation: After evaluating manifests and node definitions, Puppet performs Hiera lookups to resolve data. Question 11. Which report format is generated by default after a Puppet run? A) JSON B) CSV C) YAML D) HTML Answer: C Explanation: Puppet’s default report is written in YAML and stored under /var/lib/puppet/state/reports. Question 12. In a manifest, which data type represents an ordered collection of values? A) Hash
<>Answer: A Explanation: The -> arrow enforces ordering; the left resource must finish before the right begins. Question 15. Which attribute of a file resource ensures the file’s content matches the given source? A) mode B) owner C) source D) ensure Answer: C Explanation: The source attribute points to a file or template; Puppet copies it to the target path. Question 16. Which directory is the conventional location for a module’s templates? A) manifests/ B) files/ C) templates/ D) lib/puppet/ Answer: C
Explanation: Templates are stored in the templates directory and accessed via the template() function. Question 17. Which command installs a module from the Puppet Forge? A) puppet module install <author-module> B) puppet forge download <author-module> C) r10k deploy module <author-module> D) puppet module fetch <author-module> Answer: A Explanation: puppet module install retrieves and installs a module from the Forge. Question 18. How are class parameters automatically populated from Hiera? A) By using the lookup function inside the class B) By declaring default values in the class definition C) By enabling automatic parameter lookup in hiera.yaml D) By naming Hiera keys identical to the parameter names Answer: D Explanation: When a class is declared, Puppet looks up Hiera keys that match parameter names and uses their values.
B) each() C) filter() D) reduce() Answer: B Explanation: each yields each element to a block, commonly used for resource iteration. Question 22. What does the with function provide in Puppet code? A) A way to merge hashes B) Scoped variable definition for a block of code C) Automatic inclusion of classes D) Conditional execution based on a predicate Answer: B Explanation: with creates a temporary scope, allowing variables to be used within a block without polluting the outer scope. Question 23. Which lookup type merges multiple array values from different hierarchy levels? A) Priority (default) B) Array merge C) Hash merge D) Deep merge
Answer: B Explanation: Array merge concatenates arrays from higher levels, preserving order. Question 24. In a hiera.yaml file, what key defines the order in which data sources are consulted? A) hierarchy B) version C) defaults D) backend Answer: A Explanation: The hierarchy array lists the levels (e.g., %{environment}, common) to be searched. Question 25. Which command validates a Hiera lookup from the command line? A) puppet lookup hiera CLI tool performs a lookup using the current configuration.
A) /etc/puppetlabs/puppet/puppet.conf B) /etc/puppetlabs/puppet/ssl/certs/ca.pem C) /etc/puppetlabs/puppet/hiera.yaml D) /var/log/puppetlabs/puppetserver/puppetserver.log Answer: B Explanation: Problems with the CA certificate (ca.pem) often lead to SSL handshake failures. Question 29. Which Puppet command runs a catalog application in “no‑op” mode? A) puppet agent --test --noop B) puppet apply --noop C) puppet resource --noop D) puppet agent --dry-run Answer: A Explanation: --noop tells the agent to simulate changes without applying them; combined with --test it runs a full catalog retrieval. Question 30. Which log level provides the most detailed debugging information? A) notice B) warning
C) err D) debug Answer: D Explanation: debug logs include verbose internal details useful for troubleshooting. Question 31. Which tool can be used to inspect the current state of a resource on an agent node? A) puppet lookup B) puppet resource C) puppet module list D) puppet apply Answer: B Explanation: puppet resource <type> <name> displays the resource’s current properties on the node. Question 32. Which setting controls the maximum heap size for the Puppet Server JVM? A) puppetserver max-heap-size B) java_args C) JRUBY_OPTS D) puppetserver java_args
Question 35. Which function would you use inside a manifest to retrieve a value from Hiera with a default fallback? A) hiera() B) lookup() C) hiera_hash() D) getvar() Answer: B Explanation: lookup('key', {default_value => 'fallback'}) allows specifying a default if the key is absent. Question 36. Which attribute of a service resource ensures the service starts on boot? A) enable B) ensure C) provider D) status Answer: A Explanation: The enable attribute (true/false) controls whether the service is enabled to start at boot. Question 37. What does the exec resource’s unless attribute do?
A) Runs the command only if the condition is true B) Prevents the command from running if the condition returns 0 C) Always runs the command regardless of condition D) Sets environment variables for the command Answer: B Explanation: unless provides a guard command; if it exits with 0, the main command is skipped. Question 38. In a module’s metadata.json, which field specifies the compatible Puppet version range? A) "operatingsystem_support" B) "dependencies" C) "required_puppet_version" D) "version" Answer: C Explanation: required_puppet_version defines the Puppet version constraints for the module. Question 39. Which of the following is a secure way to store passwords for use in Puppet manifests? A) Plain‑text strings in hiera.yaml B) Encrypted eyaml files with hiera-eyaml
Explanation: Compiled catalogs are cached under /var/lib/puppetserver/catalogs. Question 42. What is the effect of setting environment_timeout = 0 in puppet.conf? A) Environments never expire; changes require a server restart. B) Environments are refreshed on every agent run. C) Environments are cached for 0 seconds, effectively disabling caching. D) Environments are ignored and default is used. Answer: C Explanation: A timeout of 0 disables environment caching, forcing the master to reload environment data each request. Question 43. Which of the following is NOT a valid Puppet data type? A) Integer B) Float C) Symbol D) Tuple Answer: C Explanation: Puppet does not have a native Symbol type; it supports Integer, Float, Tuple, etc.
Question 44. Which function can be used to merge two hashes with deep merging semantics? A) merge() B) deep_merge() C) hash_merge() D) lookup() with merge => deep Answer: D Explanation: The lookup function’s merge => deep option performs a deep merge of hash data. Question 45. Which command displays the current Puppet Server version? A) puppet --version B) puppetserver --version C) puppet agent --version D) r10k version Answer: B Explanation: puppetserver --version reports the version of the Puppet Server component. Question 46. Which file typically contains the master’s SSL private key? A) /etc/puppetlabs/puppet/ssl/private_keys/puppet.pem B) /etc/puppetlabs/puppet/ssl/certs/puppet.pem