On Wed, 2012-08-01 at 12:56 -0700, Mike Reed wrote:
Hello all,

I've been banging my head against the wall trying to get this "make" to run
and I was hoping to get some opinions as to why this might not be working.
The module in question looks like this:
Lets take a look in order:
class install-lei_chelsio_driver {
# This will place the chelsio tarball locally in /usr/src. File is pulled from puppet.
file { "/usr/src/ChelsioUwire-" :
source => "puppet:///install-lei_chelsio_driver/ChelsioUwire-" ,
ensure => present ,

# Untar the tarball
exec { "/bin/tar -xvf /usr/src/ChelsioUwire-" :
cwd => "/usr/src/" ,
creates => "/usr/src/ChelsioUwire-" ,
You don't have any dependencies specified here, so puppet doesn't know
that it has to copy over the tar file before untarring. It's possible
that this worked previously by chance... but it could just as easily
fail later.
Add a
requires => File['/usr/src/ChelsioUwire-'],
to this exec resource.
# This will run the make which will line up everything to install the drivers from source.
exec { "/usr/src/ChelsioUwire- make KDIR=/usr/src/linux-headers-2.6.32-41" :
path => "/usr/src/ChelsioUwire-" ,
There's a few things wrong here; it's quite confused. The correct exec
syntax would look like this:
exec { 'make KDIR=/usr/src/linux-headers-2.6.32-41':
path => ['/usr/bin', '/bin' ],
cwd => '/usr/src/ChelsioUwire-',
requires => Exec['/bin/tar -xvf /usr/src/ChelsioUwire-'],

The 'requires' ensures that the file is untarred before the make command
is run. Take a look at
http://docs.puppetlabs.com/references/latest/type.html#exec for
descriptions of the parameters being passed to the exec.
You should really give the rest of the puppet documentation a read
through as well;
http://docs.puppetlabs.com/learning/ordering.html talks about ordering
and dependencies.

Calvin Walton <calvin.walton@kepstin.ca>

You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 7 | next ›
Discussion Overview
grouppuppet-users @
postedAug 1, '12 at 7:56p
activeAug 2, '12 at 6:09p



site design / logo © 2022 Grokbase