Configure Forge settings
To configure how r10k downloads modules from
the Forge,specify Forge-related parameters in Hiera or pe.conf.
The Forge-related parameters on the puppet_enterprise::master::code_management master class are:
forge_baseurl: Specifies where Forge modules are installed from. The default ishttps://forgeapi.puppet.com.forge_authorization_token: Specifies the token used to authenticate to a custom Forge server.forge_proxy: Sets the proxy for all Forge interactions.
For example, this configuration specifies a custom Forge server that does not require authentication:
puppet_enterprise::master::code_management::forge_baseurl: 'https://private-forge.example.com'
If your custom Forge server requires authentication, specify both a Forge base URL and a Forge authorization token. Format the authorization token as Bearer <TOKEN>.
Configure Forge authorization tokens in Hiera eyaml or pe.conf.
For example:
puppet_enterprise::master::code_management::forge_baseurl: 'https://private-forge.example.com' puppet_enterprise::master::code_management::forge_authorization_token: 'Bearer <TOKEN>'
For example, in an eyaml data file:
puppet_enterprise::master::code_management::forge_authorization_token: ENC[PKCS7,MIIB...]
If your environment uses eyaml, a matching hiera.yaml hierarchy level might look like this (the key paths are examples):
hierarchy:
- name: "Secrets (eyaml)"
lookup_key: eyaml_lookup_key
path: "secrets.eyaml"
options:
pkcs7_private_key: /etc/puppetlabs/puppet/eyaml/private_key.pkcs7.pem
pkcs7_public_key: /etc/puppetlabs/puppet/eyaml/public_key.pkcs7.pem
When configured in Hiera, pe.conf, or console configuration data, Puppet Enterprise automatically handles Forge authorization tokens as sensitive values and prevents them from being displayed in agent output, reports, and PuppetDB.
The forge_proxy parameter sets a proxy for all Forge interactions. This setting overrides the global proxy setting, but only for Forge operations. You can configure either an unauthenticated proxy or an authenticated proxy that uses Basic or Digest authentication.
For example:
puppet_enterprise::master::code_management::forge_proxy: 'http://proxy.example.com:3128'
If you have configured a global proxy setting but do not want Forge operations to use a proxy, set forge_proxy to an empty string.
puppet_enterprise::master::code_management::forge_proxy: ''