- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with pmtprovider
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This is a Puppet custom provider for the package type called 'pmt', that allows you to manage installation, removal and upgrade of puppet modules.
The provider shells out puppet using the puppet module face, the reason for not using the puppet module api directly in code was that the puppet execution responsible for ensuring state could inadvertently carry over configuration that affects what the state should look like. For example, --module_repository is set based on configuration or command line arguments to the puppet agent | apply execution, by shelling out the puppet command we have more flexibility in that regard since we can just parameterize the execution on our own.
- A provider 'pmt' to the package resource type
Installing the module using the pmt:
puppet module install unibet-pmtprovider
Some sample usages using the provider
Installing the puppetlabs-apache puppet module:
package { 'puppetlabs-apache':
ensure => present,
provider => pmt
}
Installing puppetlabs-apache in a custom location:
package { 'puppetlabs-apache':
ensure => present,
provider => pmt,
install_options => [
{
'--modulepath' => '/custom/location'
}
]
}
Installing company-privatemodule using a custom forge:
package { 'company-privatemodule':
ensure => present,
provider => pmt,
install_options => [
{
'--module_repository' => 'https://forge.company.example.com'
}
]
}
The provider also supports version pinning and the use of symbols such as latest and absent.
See usage
If you want to contribute please send in a pull request, eventually when we have tests in place we'd prefer that your changes passes the spec tests before it gets merged