Introduction
This article guides you through setting up a Puppet module client with Puppet repositories.
Puppet Repositories
A remote repository is primarily used to download packages from an upstream source (public or private), such as public package registries or other Artifactory instances. A Puppet remote repository can be used independently or as part of a virtual repository.
For enhanced scalability, a virtual repository combines both local and remote repositories, providing a single URL.
Note that the Puppet registry upstream includes premium packages that require a Puppet premium token for download.
Configuring Puppet client with Puppet repositories:
The following details are the steps outlined to configure Artifactory as a remote repository for Puppet modules and use “puppet module install” for module management.
1. Artifactory Repository Setup
-
Navigate to Administration > Repositories in the Artifactory UI.
-
Create a new Puppet Remote Repository.
-
For premium Puppet packages: Enter the premium token in the Password/Access Token field.
-
Ensure the “Enable token authentication” option is enabled.

2. Bolt Project Initialisation
mkdir comply-bolt-project
cd comply-bolt-project
”bolt project init comply_bolt_project”.This command creates the bolt-project.yaml file.
3. Configuring bolt-project.yaml
Update the bolt-project.yaml file with Artifactory details and required module specifications:
Example bolt-project.yaml Configuration(https://help.puppet.com/scm/current/Content/UserGuide/SCM/Installation/scm_bolt_install.htm):
name: comply_bolt_project
modules:
- name: puppetlabs/<Package name>
version_requirement: '<package version>’'
module-install:
forge:
baseurl: '<Artifcatory URL>/artifactory/api/puppet/test-puppet'
authorization_token: 'Bearer <Artifactory Token>’'
4. Pulling the Puppet Package
Perform the following command to pull the required package. Note that the command requires both the Artifactory username and token for successful authentication.
The Puppet premium token (to retrieve the premium puppet package) is managed within the Artifactory remote repository.
puppet module install --module_repository=https://<username>:<Artifactory Token>@<Artifactory
URL>/artifactory/api/puppet/<Repo-key> puppetlabs/<package name>
