class nginx::install {
$prerequisites = [ "build-essential", "libcurl4-openssl-dev", "libssl-dev",
"zlib1g-dev" ]
case $operatingsystem {
centos, redhat: {
}
debian, ubuntu: {
package { $prerequisites : ensure => "installed" :
ensure => present {
exec { "Installing nginx via passenger":
path => "/bin:/usr/bin",
environment => "HOME=/root",
command => "passenger-install-nginx-module --auto-download
--auto",
user => "root",
group => "root",
unless => "ls -l /opt | grep nginx",
logoutput => on_failure,
}
}
file {"/etc/init.d/nginx":
source => "puppet:///modules/nginx/nginx-initd",
owner => root,
group => root,
mode => 755,
require => Class["nginx::install"],
notify => Class["nginx::service"],
}
}
}
}
}
The above has a syntax error on line 7 and the catalog won't build but
essentially I want to 'ensure' that the pre-requsite packages are installed
prior to attempting to execute the command (because if the pre-requisites
aren't there, the command will fail).
I think I am close but the best way to handle this is eluding me (and my google
searches).
--
Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [email protected]
1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com
Need help communicating between generations at work to achieve your desired
success? Let us help!
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.