Is nested class supported in Puppet

0 votes
Is nested class supported on puppet? If yes, how does it work?
Mar 8, 2019 in Puppet by Laksha
2,667 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, 2019 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, 2019 in Puppet by Yogesh
2,810 views
0 votes
1 answer

Is using Puppet class Inheritance even useful?

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

answered Mar 5, 2019 in Puppet by Kyraa
1,257 views
0 votes
1 answer

What is resource declaration in Puppet?

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

answered Mar 11, 2019 in Puppet by Bob
1,297 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, 2019 in Puppet by Jason
2,160 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
7,188 views
+2 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, 2019 in Puppet by Shalaka
1,237 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 15, 2019 in Puppet by Hatim
1,033 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP