A Linux administrator needs to ensure the NTP service is consistently configured across multiple servers using Puppet. They decide to create a Puppet class named ntp_config to manage the NTP package and service.
Which of the following code blocks correctly defines this class in a Puppet manifest file?
The correct answer provides the proper syntax for defining a Puppet class. A class definition begins with the class keyword, followed by the name of the class, and then a pair of curly braces {} containing the resources that make up the class.
The option showing YAML syntax is incorrect because it is used for Ansible Playbooks, not Puppet manifests.
The option using class { 'ntp_config': ... } syntax is incorrect for defining a class. This resource-like syntax is used to declare a class (i.e., apply it to a node), often when passing parameters, but it is not used for the initial definition of the class itself.
The option using the define keyword is incorrect. define is used to create a defined resource type, which is similar to a class but can be instantiated multiple times on a node, whereas a class is a singleton.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Puppet and how does it manage configurations?
Open an interactive chat with Bash
Why is the `class` keyword important in Puppet?
Open an interactive chat with Bash
What is the role of the `require` parameter in Puppet's resource definitions?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .