Hi,

My requirement is copy some files from agent source to agent's destination. 
I have the list of files. I store the list of file as a hash looks follows


*$foo = [{"addr" => $source1, "dest" => 
$destination1},                                               {"addr" =>  
$source2, "dest" => $destination2}]*

And then I define a type as follows to go through the hash and execute copy 
command















* define bar () {                                                          
$var1 = $name["addr"]                                                       
    $var2 = $name["dest"]   exec { "myexec":    command => "cp  ${var1} 
${var2}",    cwd => $agentLocation,    mode => "0777",    path      => 
$command_path,    logoutput => true,    timeout => 3600,    } 
                                              
                                                 } *


But this gives me exception says

* Error 400 on SERVER: Duplicate declaration: Exec[myexec] is already 
declared in file /etc/puppet/modules/config/manifests/init.pp:78; cannot 
redeclare at /etc/puppet/modules/config/manifests/init.pp:78*

How can I correct this or is there any alternative for this specific task ?

Regards,
Malintha Adikari

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1fe78ed2-d4c1-4c36-aa8d-c3c6dee26a14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to