Is nested class supported in Puppet?

0 votes
Is nested class supported on puppet? If yes, how does it work?
Mar 8 in Puppet by Laksha
44 views

1 answer to this question.

0 votes

Puppet supports the concept of nesting of classes in which it allows to use nested classes which means one class inside the other. This helps in achieving modularity and scoping.

class testclass { 
   class nested { 
      file {  
         '/etc/passwd': 
         owner => 'superuser', 
         group => 'superuser', 
         mode => 644; 
      } 
   } 
} 
class anotherclass { 
   include myclass::nested 
} 
answered Mar 8 by Devika

Related Questions In Puppet

0 votes
1 answer

What is class inheritance in Puppet?

What is class Inheritance? Node groups inherent properties ...READ MORE

answered Mar 5 in Puppet by Yogesh
53 views
0 votes
1 answer

Is using Puppet class Inheritance even useful?

Building a service from reusable Puppet modules ...READ MORE

answered Mar 5 in Puppet by Kyraa
17 views
0 votes
1 answer

What is resource declaration in Puppet?

Puppet code is composed primarily of resource declarations. ...READ MORE

answered Mar 11 in Puppet by Bob
20 views
0 votes
1 answer

Is it possible to install puppet agent in a docker container on linux?

Hey @Janice, this is pretty simple. Create ...READ MORE

answered Mar 12 in Puppet by Jason
109 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
148 views
0 votes
1 answer
0 votes
1 answer

Purpose of node block in Puppet

A node block allows you to specify ...READ MORE

answered Mar 11 in Puppet by Shalaka
12 views
0 votes
1 answer

Pupper error - Duplicate definition: Service[ServiceName] is already defined

Hey @Nigya, try something like this: class MyClass ...READ MORE

answered Feb 14 in Puppet by Hatim
26 views