I've installed camptocamp/nagios from Puppet Forge, but seems it has dependencies to puppet-apache_c2c which is published on GitHub.
I've installed nagios module as suggested:
puppet module install camptocamp-nagios
However how do I install missing dependencies?
I've seen some JIRA ticket which would provide that ability, however it seems it's not implemented yet (status: ready for engineering). So for now is there any workaround? What's the correct approach of installing non-puppet-forge modules?
Using librarian-puppet:
Check
modulepath
on Puppet master:Which will give you e.g.
/etc/puppet/environments/production/modules
.Then create
Puppetfile
one level above pathmodulepath
. i.e./etc/puppet/environments/production/Puppetfile
:And run
librarian-puppet install
from the folder where isPuppetfile
located.In
.librarian/puppet/config
you can specify custom path for modules installation (relative fromPuppetfile
):I personally don't use
r10k
or anything like that.At the end of the day a puppet module is just a directory in your modules folder.
If you are using git to manage your modules you could add it as a submodule, like this:
Of course this isn't doing any resolution of dependencies.
You'll have to check the
metadata.json
yourself and install those.Which is OK for my case, we don't add modules very often.