Based on some code from this blog and in the comments I'm trying to define some simple CPAN install functionality for Puppet, and I'm trying this:
class perl {
define install-cpan () {
exec { "cpan_load_${name}":
command => "perl -I.cpan -MCPAN -e '\$ENV{PERL_MM_USE_DEFAULT}=1; install $name'",
cwd => "/root",
path => "/usr/bin:/usr/sbin:/bin:/sbin",
unless => "perl -M$name -e 1",
}
}
package { 'perl': ensure => installed }
}
perl::install-cpan { "Bundle::CPAN": }
But I get this error:
err: Could not retrieve catalog from remote server: Could not intern
from pson: Could not convert from pson: Could not find relationship
target "Perl::Install-cpan[Bundle::CPAN]"
What does this mean and how do I fix it?