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
29 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
18 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
9 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
8 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
29 views
+13 votes
2 answers
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
6 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
11 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.