Hey Guys,
Thank you Peter and John for your continued input into this one. I absolutely agree with both of you about building our own packages and as I've been working with puppet and trying to configure these systems, it's become apparent that our own internal repository would be beneficial for a number of reasons.
With that said, I'm quite new to the 'nix world and I suspect building out packages/repository would take a little time and probably a few days of googl'in. So for the very immediate future, I'd like to get this working so I can get our initial puppet build going. packages/repository are definitely on my list tho.
I'd like to quickly mention that the impetus behind this is that I'd like to run this against machines that we've built up without puppet and if possible, I'd like to refrain from things like the below manifest being run on a machine which already has boost installed, albeit manually without puppet.
I changed the class to the following:
class boost_install {
# This will place the gzip locally in /tmp. File is pulled from puppet.
file { "/tmp/boost_1_41_0.tar.bz2" :
source => "puppet:///boost_install/boost_1_41_0.tar.bz2" ,
ensure => present ,
}
# This will extract the boost gzip to the /tmp directory.
exec { "untar_boost" :
command => "tar -xjvf /tmp/boost_1_41_0.tar.bz2" ,
cwd => "/tmp/" ,
creates => "/tmp/boost_1_41_0" ,
path => ["/bin" , "/usr/sbin"] ,
require => File["/tmp/boost_1_41_0.tar.bz2"] ,
}
# This will run the boost bootstrapper
exec { "/tmp/boost_1_41_0/bootstrap.sh" :
subscribe => Exec["untar_boost"] ,
}
}
From the above code, I expect a few things to happen:
1. The exec "untar_boost" should only fire if "/tmp/boost_1_41_0.tar.bz2" is present
2. The exec "/tmp/boost_1_41_0/bootstrap.sh" should only fire if the untar boost occurs, which I believe is dependent upon the file being in that location. (I'm thinking this will work as a temporary dependency as I'm not sure how to make a dependency for the initial file being pulled down. In other words, I expect the file to be pulled down on every run which I guess is something I'll have to fix later). I'm thinking if I change from /tmp to something like /usr/src/puppet_pkgs then the files won't be deleted upon reboot and I can use them as a temporary placeholder until I figure out a more elegant solution to this hack that I've put together.
I'm sorry for writing the novel above and I very much appreciate your help and support on this one.
Cheers,
Mike