another question around this problem.
is there a way the the puppet module install
tool to install from a local repo I already downloaded to the disk?
You can use Puppet Library to host your own private Puppet Forge. It supports serving modules from disk, and proxying remote forges.
Start the server, pointing it to your downloaded modules
puppet-library --module-dir /my/downloaded/modules --port 8888
Add the following to puppet.conf
to point it at your local module repository:
[main]
module_repository=http://localhost:8080/
Then, when you run puppet module install
, the modules will be installed from the local repository. If you're using librarian-puppet can also point your Puppetfile
at the local forge.
Unfortunately, no.
You can read the manual page for the puppet module
face here. While there seems to be an option to specify private forges when installing modules, Puppetlabs' Forge API are not public, and Puppetlabs itself doesn't support any public or private application other than their Forge to build private repositories.
As an alternative, you could try librarian-puppet
: https://github.com/rodjek/librarian-puppet.
It allows you to specify your module dependencies in a Puppetfile
, also allowing to specify a Git repository as a source (so you can install also modules that are not in the Forge).
This does not directly answer the question, but you can install puppet modules from a local file instead of using a local repo. Saves setting up extra stuff if this is a once a once off.
puppet module install ~/puppetlabs-apt-2.0.1.tar.gz --ignore-dependencies --force
The modules can be downloaded directly from puppet forge and saved to local storage.
ignore-dependencies is required if the module has dependancies that you have not installed yet.
There seems to be only 3 options for hosting your own puppet forge server:
Puppet has published their API
Note: I'm not related to any of the products above