yarlagadda ramya
2013-Jan-15 11:52 UTC
[Puppet Users] Pls do suggest a simple example for creating a class using manifests
Hi all, I have created two different manifests: 1) For moving a particular file from one directory to another using exec. 2)For renaming that same file using exec. Now can you please suggest me the syntax for creating a class which applies these two manifests?? In Modules, actually a very complex example for class is given, which is a bit difficult to understand at very low level knowledge in puppet. Kindly share if you have any solutions with you. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/O61Ie_ltjhsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jason Cochard
2013-Jan-22 21:55 UTC
[Puppet Users] Re: Pls do suggest a simple example for creating a class using manifests
You could wrap each of these with a class name, or combine them into one class. Then include the class on the node you wish it to be applied to. Example: class myclass { exec { "name1": command => /some/command/with/full/path } } Then in your site.pp, for the node you want this applied to: node mynode.mydomain.local { include myclass } I wouldn''t really get into a habit of using the exec command, as you will most likely end up doing really horrible hacks to get things to work, and that isn''t really how puppet is meant to be applied, but that is the general idea of how you get a class applied to a node. On Tuesday, January 15, 2013 3:52:28 AM UTC-8, yarlagadda ramya wrote:> > Hi all, > > I have created two different manifests: > 1) For moving a particular file from one directory to another using exec. > 2)For renaming that same file using exec. > > Now can you please suggest me the syntax for creating a class which > applies these two manifests?? In Modules, actually a very complex example > for class is given, which is a bit difficult to understand at very low > level knowledge in puppet. > > Kindly share if you have any solutions with you. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/bBmidJivJ9AJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Seemingly Similar Threads
- How to add a new line at a particular place in a file..
- Host name look up failure- unable to generate certificate in agent and transfer that to master for signature.
- Global Variables?
- Re: How can i create a class with this....?? Pls help
- self-referential representations in S4