My deployment is not connected to the internet. Where do I put my
gemrc file to specify a local gem repository for Puppet?
Version and installation information
PE version: 5.0 and later
Installation type: Standard
Sometimes gems need to be installed on agents, sometimes on the master, and sometimes both. Since
puppetserver is a JVM, sometimes the gem needs to be installed into the
puppetserver JVM. With that in mind, we have steps for each of these contexts.
gemrc on Puppet agents and/or the Puppet master
Complete these steps on all agents that install gems from an internal gem repo. If you need external network access, you might want to set a proxy server up.
The configuration file for customizing management and installation of gems used with Puppet is
/opt/puppetlabs/puppet/etc/gemrc. This directory does not exist by default, so you must create it.
Create the directory:
gemrcfile to the directory:
cp <YOUR GEMRC FILE> /opt/puppetlabs/puppet/etc/gemrc
Verify your configuration change by running:
gemrc in the
gemrc with the
puppetserver command, you must install the
.gemrc in the home directory of the user executing the
puppetserver command on the master. We suggest that you add the
.gemrc to both the root and puppet user for consistency.
.gemrc to the appropriate directory as needed, for example:
cp <YOUR GEMRC FILE> ~puppet/.gemrc
cp <YOUR GEMRC FILE> /root/.gemrc