parent
eea9ee8a67
commit
c29eb0d123
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# Requires:
|
# Requires:
|
||||||
#
|
#
|
||||||
# Perl
|
# perl
|
||||||
#
|
#
|
||||||
# Sample Usage:
|
# Sample Usage:
|
||||||
#
|
#
|
||||||
|
@ -23,12 +23,7 @@ define cpan(
|
||||||
$creates,
|
$creates,
|
||||||
$timeout = 0
|
$timeout = 0
|
||||||
) {
|
) {
|
||||||
|
include perl
|
||||||
Exec { path => '/usr/bin' }
|
|
||||||
|
|
||||||
package { 'perl-CPAN':
|
|
||||||
ensure => installed
|
|
||||||
}
|
|
||||||
|
|
||||||
file { [ '/root/.cpan/', '/root/.cpan/CPAN/' ]:
|
file { [ '/root/.cpan/', '/root/.cpan/CPAN/' ]:
|
||||||
ensure => directory
|
ensure => directory
|
||||||
|
@ -36,16 +31,17 @@ define cpan(
|
||||||
|
|
||||||
file { '/root/.cpan/CPAN/MyConfig.pm':
|
file { '/root/.cpan/CPAN/MyConfig.pm':
|
||||||
content => template('cpan/MyConfig.pm.erb'),
|
content => template('cpan/MyConfig.pm.erb'),
|
||||||
require => [
|
require => File[[ '/root/.cpan/', '/root/.cpan/CPAN/' ]],
|
||||||
Package['perl-CPAN'],
|
|
||||||
File[[ '/root/.cpan/', '/root/.cpan/CPAN/' ]]
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "cpan-${name}":
|
exec { "cpan-${name}":
|
||||||
command => "perl -MCPAN -e 'install ${name}'",
|
command => "perl -MCPAN -e 'install ${name}'",
|
||||||
creates => $creates,
|
creates => $creates,
|
||||||
require => File['/root/.cpan/CPAN/MyConfig.pm'],
|
path => '/usr/local/bin:/usr/bin',
|
||||||
|
require => [
|
||||||
|
Class['perl'],
|
||||||
|
File['/root/.cpan/CPAN/MyConfig.pm']
|
||||||
|
],
|
||||||
timeout => $timeout
|
timeout => $timeout
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue