Configuring Forge settings

To configure how r10k downloads modules from the Forge, specify the forge_settings parameters in Hiera.

The Forge related parameters on the puppet_enterprise::master::code_management master class are:

  • forge_baseurl: Indicate where Forge modules are installed from. The default is https://forgeapi.puppetlabs.com.
  • forge_authorization_token: Specify the token for authenticating to a custom Forge server.
  • forge_proxy: Set the proxy for all Forge interactions.

For example, this configuration specifies a custom Forge server that doesn't require authentication:

pe_r10k::forge_settings:
  baseurl: 'https://private-forge.mysite'

If your custom Forge server requires authentication, you must specify both baseurl and authorization_token. You must format authorization_token as a string prepended with Bearer, particularly if you use Artifactory as your Forge server. For example:

pe_r10k::forge_settings: 
  baseurl: 'https://private-forge.example'
  authorization_token: 'Bearer <TOKEN>'

The proxy parameter sets a proxy for all Forge interactions. This setting overrides the global proxy setting but only for Forge operations (refer to the global proxy setting for more information). You can set an unauthenticated proxy or an authenticated proxy with either Basic or Digest authentication. For example:

pe_r10k::forge_settings: 
  proxy: 'http://proxy.example.com:3128'

If you set a global proxy, but you don't want Forge operations to use a proxy, under the forge_settings parameter, set proxy to an empty string.