Declare Git repositories in the Puppetfile
You can declare your own modules, modules that aren't from the Forge, data, or other non-module content that you want to install from Git repositories.
- To specify environment content from a Git
repository, use the
mod
directive and specify the content name as a string. Then and use:git
to specify the repository location, and:branch
to reference a branch. For example:mod 'apache', :git => 'https://github.com/puppetlabs/puppetlabs-apache' :branch => '<BRANCH_NAME>'
- Optional: Specify additional options or alternative configurations, if needed:
- For non-module content, you must Specify installation paths for repositories .Content is installed in the
modules
directory and treated as a module, unless you use the:install_path
option. You must use:install_path
for non-module content to keep your data separate from your modules. - If the content requires SSH authentication, read about how to Declare module or data content with SSH private key authentication .
- By default, content from Git repositories stays updated with the repository's main branch, but you can Keep repository content at a specific version and Declare content from a relative control repo branch.
- For non-module content, you must Specify installation paths for repositories .
- Save and commit your changes.