Ritesh Nanda
2014-Apr-21 23:27 UTC
[Puppet Users] using custom array based fact with defined type
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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e1496d63-5bbd-45bc-ac0b-9141287ba2c2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.