Vagrant: Fix installation of perl-CPAN

refs #4506
This commit is contained in:
Eric Lippmann 2013-08-14 14:35:37 +02:00
parent a2de4a8c22
commit 63999c80ac
3 changed files with 25 additions and 18 deletions

View File

@ -400,7 +400,8 @@ exec { 'create_monitoring_test_config':
command => 'sudo install -o root -g root -d /usr/local/share/misc/ && \
sudo /usr/local/bin/create_monitoring_test_config.pl -l icinga \
/usr/local/share/misc/monitoring_test_config',
creates => '/usr/local/share/misc/monitoring_test_config'
creates => '/usr/local/share/misc/monitoring_test_config',
require => Cpan['Monitoring::Generator::TestConfig']
}
define populate_monitoring_test_config {
@ -418,14 +419,14 @@ define populate_monitoring_test_config {
}
}
file { '/usr/local/icinga-mysql/etc/conf.d/test_config':
file { '/usr/local/icinga-mysql/etc/conf.d/test_config/':
ensure => directory,
owner => icinga,
group => icinga,
require => Cmmi['icinga-mysql']
}
file { '/usr/local/icinga-pgsql/etc/conf.d/test_config':
file { '/usr/local/icinga-pgsql/etc/conf.d/test_config/':
ensure => directory,
owner => icinga,
group => icinga,

View File

@ -1,7 +1,6 @@
# 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.
# Download and install Perl modules from the Perl Archive Network, the canonical location for Perl code and modules.
#
# Parameters:
# [*creates*] - target directory the software will install to.
@ -11,6 +10,8 @@
#
# Requires:
#
# Perl
#
# Sample Usage:
#
# cpan { 'perl-module':
@ -29,9 +30,14 @@ define cpan(
ensure => installed
}
file { [ '/root/.cpan/', '/root/.cpan/CPAN/' ]:
ensure => directory
}
file { '/root/.cpan/CPAN/MyConfig.pm':
content => template('cpan/MyConfig.pm.erb'),
require => Package['perl-CPAN']
require => [ Package['perl-CPAN'],
File[[ '/root/.cpan/', '/root/.cpan/CPAN/' ]] ]
}
exec { "cpan-${name}":