FAQ
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.

Search Discussions

  • Jason Cochard at Jan 22, 2013 at 9:55 pm
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 15, '13 at 11:52a
activeJan 22, '13 at 9:55p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Yarlagadda ramya: 1 post Jason Cochard: 1 post

People

Translate

site design / logo © 2022 Grokbase