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/ && \ command => 'sudo install -o root -g root -d /usr/local/share/misc/ && \
sudo /usr/local/bin/create_monitoring_test_config.pl -l icinga \ sudo /usr/local/bin/create_monitoring_test_config.pl -l icinga \
/usr/local/share/misc/monitoring_test_config', /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 { 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, ensure => directory,
owner => icinga, owner => icinga,
group => icinga, group => icinga,
require => Cmmi['icinga-mysql'] 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, ensure => directory,
owner => icinga, owner => icinga,
group => icinga, group => icinga,

View File

@ -19,14 +19,14 @@
# #
# Sample Usage: # Sample Usage:
# #
# cmmi { 'example-software': # cmmi { 'example-software':
# url => 'http://example-software.com/download/', # url => 'http://example-software.com/download/',
# output => 'example-software.tar.gz', # output => 'example-software.tar.gz',
# flags => '--prefix=/opt/example-software', # flags => '--prefix=/opt/example-software',
# creates => '/opt/example-software', # creates => '/opt/example-software',
# make => 'make && make install' # make => 'make && make install'
# make_timeout => 600 # make_timeout => 600
# } # }
# #
define cmmi( define cmmi(
$url, $url,

View File

@ -1,7 +1,6 @@
# Define: cpan # Define: cpan
# #
# Download and install Perl modules from the Perl Archive Network, the gateway to all things Perl. # Download and install Perl modules from the Perl Archive Network, the canonical location for Perl code and modules.
# The canonical location for Perl code and modules.
# #
# Parameters: # Parameters:
# [*creates*] - target directory the software will install to. # [*creates*] - target directory the software will install to.
@ -11,12 +10,14 @@
# #
# Requires: # Requires:
# #
# Perl
#
# Sample Usage: # Sample Usage:
# #
# cpan { 'perl-module': # cpan { 'perl-module':
# creates => '/usr/local/share/perl5/perl-module', # creates => '/usr/local/share/perl5/perl-module',
# timeout => 600 # timeout => 600
# } # }
# #
define cpan( define cpan(
$creates, $creates,
@ -29,9 +30,14 @@ define cpan(
ensure => installed ensure => installed
} }
file { [ '/root/.cpan/', '/root/.cpan/CPAN/' ]:
ensure => directory
}
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 => Package['perl-CPAN'] require => [ Package['perl-CPAN'],
File[[ '/root/.cpan/', '/root/.cpan/CPAN/' ]] ]
} }
exec { "cpan-${name}": exec { "cpan-${name}":