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-1.0.2.26.tar.gz" :
source => "puppet:///install-lei_chelsio_driver/ChelsioUwire-1.0.2.26.tar.gz" ,
ensure => present ,
}
# Untar the tarball
exec { "/bin/tar -xvf /usr/src/ChelsioUwire-1.0.2.26.tar.gz" :
cwd => "/usr/src/" ,
creates => "/usr/src/ChelsioUwire-1.0.2.26" ,
}
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-1.0.2.26.tar.gz" :
source => "puppet:///install-lei_chelsio_driver/ChelsioUwire-1.0.2.26.tar.gz" ,
ensure => present ,
}
# Untar the tarball
exec { "/bin/tar -xvf /usr/src/ChelsioUwire-1.0.2.26.tar.gz" :
cwd => "/usr/src/" ,
creates => "/usr/src/ChelsioUwire-1.0.2.26" ,
}
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-1.0.2.26.tar.gz'],
to this exec resource.
# This will run the make which will line up everything to install the drivers from source.
exec { "/usr/src/ChelsioUwire-1.0.2.26 make KDIR=/usr/src/linux-headers-2.6.32-41" :
path => "/usr/src/ChelsioUwire-1.0.2.26" ,
}
There's a few things wrong here; it's quite confused. The correct execexec { "/usr/src/ChelsioUwire-1.0.2.26 make KDIR=/usr/src/linux-headers-2.6.32-41" :
path => "/usr/src/ChelsioUwire-1.0.2.26" ,
}
syntax would look like this:
exec { 'make KDIR=/usr/src/linux-headers-2.6.32-41':
path => ['/usr/bin', '/bin' ],
cwd => '/usr/src/ChelsioUwire-1.0.2.26',
requires => Exec['/bin/tar -xvf /usr/src/ChelsioUwire-1.0.2.26.tar.gz'],
}
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 readthrough 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.