Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Iterate on filenames

Hi,

In my puppet script, I've got several classes. In the first class, I copy and move several folders / files

In the second class, I would like to iterate on the filenames of a folder, and call a function. In my idea, the code should be something like this :

$list = exec('/bin/ls /tmp/PA/04.38.00')  
  each($list) |$shared| {
    wls::resourcedeployer{ 'sharedlib': 
        domain         => $wlsDomainName,
        adapterPath    => $shared,
        adapterType    => 'library',
        address        => $address,
     }
}

But of course, it doesn't work :( How could I do ?

Thanks in advance