Is there a way to list folder names into a file and let a promise read each 
line and create these folders?  

If not, is it possible to create a cf file that defines variables (folder list) 
and have another cf file use these variables to create the folders?

Am I going about this wrong?

I am trying to make cfengine easier to use for my peers by creating template 
promises that read input files.

Below are the files that I have been playing with.  What you see below is the 
entirety of each files.

/tmp/templates/variables.cf
"bundle agent inputVariables
{
        vars:
                "paths" slist           => { 
"/tmp/test/create_folder1/create_folder2/." , 
"/tmp/test/create_folder1/create_folder3/." };
}"

/tmp/templates/create_local_folder_with_variables.cf
"body common control
{
        bundlesequence          => { "inputVariables" , "createFolder" };
        ignore_missing_bundles  => "true";
        require_comments        => "true";
        inputs                  => { "/var/cfengine/inputs/cfengine_stdlib.cf" 
, "/tmp/templates/variables.cf" };
        version                 => "1.0";
}

body agent control
{
        verbose         => "true";
}

bundle agent createFolder
{
        files:
                "$(paths)"
                comment => "create dir",
                perms => mog("755", "root", "root"),
                create => "true";
}"

Regards,
j
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to