On 07-03-11 12:26, no-re...@cfengine.com wrote:
> Forum: Cfengine Help
> Subject: Re: Bundling the configuration into modules
> Author: kenneho
> Link to topic: https://cfengine.com/forum/read.php?3,20949,20978#msg-20978
>
> Thanks for your reply.
>
> In my first post I was a bit unclear as to what I'm actually looking for. To 
> my understanding, bundles correspond more to "classes" in Puppet. In puppet, 
> One use modules for packing files, configuration, documentation and so forth 
> related to a service into one big chuck. These files are all placed under a 
> specific subdirectory (i.e. /path/to/module). Working with modules make the 
> configuration divided into logically separate chunks. Does cfengine have a 
> similar concept for organizing the configuration code?
>
>

Maybe this is what you looking for. I am using a lot of bundles and each 
bundle has it own data directoryem eg:

  /data/cfengine3
        config/bundles
                torque.cf
                ssh.cf
         data/bundles
                torque
                        <host>
                        <cluster>
                ssh
                        ...

In each bundle i define where the data directory is. eg: torque.cf
bundle agent torque_config(subdir)
{
     vars:
         any::

             "bundle_dir" string => "/data/cfengine3/data/bundles/torque";
             "source_dir" string => "$(bundle_dir)/$(subdir)";
             ....
}

in hourly.cf:
bundle agent hourly {
         methods:
                 any::
                         "any" usebundle => torque_config("lisa");
}


-- 
********************************************************************
*  Bas van der Vlies                    e-mail: b...@sara.nl       *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to