Specify installation paths for repositories
You can set individual installation paths for any Git repositories you declare in a Puppetfile.
The :install_path
option allows you to separate non-module content in
your directory structure or to set specific installation paths for individual modules. When
you set this option for a specific repository, it overrides the moduledir
setting (which is either the default modules
directory or a
custom path if you Change the module installation directory).
In your Puppetfile, under the Git repository's mod
directive, use the :install_path
option to declare the
location where you want to install the content. The path must a string and it must be
relative to the Puppetfile's location. To install in the
root directory, specify an empty value.
Content is installed into a subdirectory named after to the content's mod
directive. For example, this declaration installs site data
content from a Git repository into the
./hieradata
directory:
mod 'site_data', :git => 'git@git.example.com:site_data.git', :install_path => 'hieradata'
The final file path for this content is ./hieradata/site_data
.
As another example, this declaration installs site
data content from a different Git repository into a
site_data
directory at the
root:
mod 'site_data_2', :git => 'git@git.example.com:site_data_2.git', :install_path => ''
The final file path for this content is ./site_data
.