Puppet lesson

30 Jun 2013

The first lesson:

You cannot depend on an external module

There will be discrepancies. Well, you'd better take their modules and modify it to suit your needs.

Pack your own local modules

Pack it somewhere and run puppet command with –modulepath.

I have no intelligent ways to gather all dependencies of dependencies though. I just did it manually… with `puppet install module --modulepath=./modules puppetlabs-nginx`.

Here is an example: https://github.com/tanin47/readdaily-puppet

Puppet 3 doesn't include environment variables

You have to include it manually like this:

exec { 'nginx-install': command => "/usr/local/rvm/gems/${ruby_version}/bin/passenger-install-nginx-module --auto --auto-download --prefix=${installdir}", user => 'root', environment => ['HOME=/root'], unless => "/usr/bin/test -f ${installdir}/sbin/nginx", require => [ Rvm_system_ruby[$ruby_version], Rvm_gem["${ruby_version}/passenger"]]; }

Give it a kudos