nerdexam
Linux_Foundation

LFCS · Question #217

What is the syntax error in the following simple Puppet configuration file? class test_class { file { "/tmp/test.txt": mode => 600, owner => root, group => root } } # Define the node node testclient…

The correct answer is D. isa should be include. The Puppet configuration has a syntax error because it uses isa to include a class in a node definition, where the correct keyword should be include.

Submitted by the_admin· Apr 18, 2026Service Configuration

Question

What is the syntax error in the following simple Puppet configuration file? class test_class { file { "/tmp/test.txt": mode => 600, owner => root, group => root } } # Define the node node testclient { isa test_class }

Options

  • AComments begin with // character and not a #.
  • BThe colon (:) after /tmp/test.txt should be a semicolon (;).
  • Cclass, node and file sections require a semicolon (;) at the end of their definitions.
  • Disa should be include.

How the community answered

(37 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    95% (35)

Why each option

The Puppet configuration has a syntax error because it uses `isa` to include a class in a node definition, where the correct keyword should be `include`.

AComments begin with // character and not a #.

Comments in Puppet correctly begin with a hash symbol (#), as shown in the example, so this is not a syntax error.

BThe colon (:) after /tmp/test.txt should be a semicolon (;).

In Puppet resource declarations, a colon (:) correctly separates the resource title from its attribute list, such as `"/tmp/test.txt":`, so a semicolon (;) would be incorrect here.

Cclass, node and file sections require a semicolon (;) at the end of their definitions.

Class, node, and resource definitions in Puppet use curly braces ({}) for block delimitation and do not require semicolons (;) at the end of their definitions.

Disa should be include.Correct

To declare or include a class within a node definition in Puppet, the correct keyword to use is `include` (e.g., `include test_class`), not `isa`, which is not a valid Puppet keyword for this purpose.

Concept tested: Puppet class inclusion syntax

Source: https://www.puppet.com/docs/puppet/7/lang_classes.html

Topics

#Puppet syntax#Node definition#Class inclusion#Configuration management

Community Discussion

No community discussion yet for this question.

Full LFCS Practice