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...
IT & Cybersecurity Package Join Premium for Full Access