mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 05:44:36 +02:00
Vagrant: Install Perl module Monitoring::Generator::TestConfig
refs #4506
This commit is contained in:
parent
99871e73bd
commit
6ce47f297b
@ -384,3 +384,8 @@ exec { 'install php-ZendFramework-Db-Adapter-Pdo-Pgsql':
|
|||||||
unless => 'rpm -qa | grep php-ZendFramework-Db-Adapter-Pdo-Pgsql',
|
unless => 'rpm -qa | grep php-ZendFramework-Db-Adapter-Pdo-Pgsql',
|
||||||
require => Exec['install ZendFramework']
|
require => Exec['install ZendFramework']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cpan { 'Monitoring::Generator::TestConfig':
|
||||||
|
creates => '/usr/local/share/perl5/Monitoring/Generator/TestConfig.pm',
|
||||||
|
timeout => 600
|
||||||
|
}
|
||||||
|
43
.vagrant-puppet/modules/cpan/manifests/init.pp
Normal file
43
.vagrant-puppet/modules/cpan/manifests/init.pp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# Define: cpan
|
||||||
|
#
|
||||||
|
# Download and install Perl modules from the Perl Archive Network, the gateway to all things Perl.
|
||||||
|
# The canonical location for Perl code and modules.
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# [*creates*] - target directory the software will install to.
|
||||||
|
# [*timeout* ] - timeout for the CPAN command.
|
||||||
|
#
|
||||||
|
# Actions:
|
||||||
|
#
|
||||||
|
# Requires:
|
||||||
|
#
|
||||||
|
# Sample Usage:
|
||||||
|
#
|
||||||
|
# cpan { 'perl-module':
|
||||||
|
# creates => '/usr/local/share/perl5/perl-module',
|
||||||
|
# timeout => 600
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
define cpan(
|
||||||
|
$creates,
|
||||||
|
$timeout
|
||||||
|
) {
|
||||||
|
|
||||||
|
Exec { path => '/usr/bin' }
|
||||||
|
|
||||||
|
package { 'perl-CPAN':
|
||||||
|
ensure => installed
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/root/.cpan/CPAN/MyConfig.pm':
|
||||||
|
content => template('cpan/MyConfig.pm.erb'),
|
||||||
|
require => Package['perl-CPAN']
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { "cpan-${name}":
|
||||||
|
command => "perl -MCPAN -e 'install ${name}'",
|
||||||
|
creates => $creates,
|
||||||
|
require => File['/root/.cpan/CPAN/MyConfig.pm'],
|
||||||
|
timeout => $timeout
|
||||||
|
}
|
||||||
|
}
|
5
.vagrant-puppet/modules/cpan/templates/MyConfig.pm.erb
Normal file
5
.vagrant-puppet/modules/cpan/templates/MyConfig.pm.erb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
$CPAN::Config = {
|
||||||
|
'prerequisites_policy' => q[follow]
|
||||||
|
};
|
||||||
|
1;
|
||||||
|
__END__
|
Loading…
x
Reference in New Issue
Block a user