Could you please post the result of: validate_array($::arraydev) ?

You need to have the "puppetlabs/stdlib" module installed

Toni


On Tuesday, April 22, 2014 1:27:21 AM UTC+2, Ritesh Nanda wrote:
>
> Hello , 
>
> I have a custom facts which returns the block devices based on some 
> condition in an array.
>
>  facter | grep arraydev
> arraydev => ["sdb", "sdc"]
>
> Now i want to use this array in defined type so that a exec resource can 
> run as no. of times elements in the array.
>
> vi modules/test/manifest/exeecho.pp
>
> define test::exeecho() {
>         exec {"echo_${name}":
>           command => "echo hello >> /tmp/foo23",
>           path => ['/bin'],
>          }
>        }
>
>
> vi modules/test/manifest/init.pp
>
> class test {
> test::exeecho{$::arraydev:}
> }
>
>
> But puppet agent -t run gives a error.
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid 
> resource type exec at 
> /etc/puppetlabs/puppet/modules/test/manifests/exeecho.pp:5 on node 
> pzxdcc0002.cdbt.pldc.kp.org
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> Please tell me if i am doing something wrong.
>
> Regards,
> Ritesh Nanda
>
>
>
>
>
>
>

-- 
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/01c935f4-a43b-4d4a-945e-2b5ac315775e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to