Module to manage Puppet control repository hosted on Github
Project description
Py Control Repository is SDK for Pyththon which allows developpers to manage a Puppet Control Repository based on GitHub.
Install
$ pip install py-control-repository
Usage
Get Puppet Environment
control_repository = ControlRepository('myorga', 'my_control_repository', 'token')
puppet_environment = control_repository.get_environment('production')
Get Puppetfile
puppetfile = puppet_environment.get_puppetfile()
List Puppet modules in Puppetfile
module_list = puppetfile.list_modules()
Add a custom forge URL
puppetfile.set_forge_url('https://urlcustomforge.com/forge')
Remove a custom forge URL
puppetfile.remove_forge_url()
Add a forge module
puppetfile.add_forge_module('puppetlabs/apache', version='0.10.1')
Update a forge module
puppetfile.update_forge_module('puppetlabs/apache', '0.11.0')
Add a git module
With no version spicified, it will install the current master branch.
puppetfile.add_git_module('custom_module', 'https://url.my.git/orga/custom_module')
You can specify a specific git reference. Supported are :
branch
ref
tag
commit
puppetfile.add_git_module('custom_module',
'https://url.my.git/orga/custom_module',
reference_type='commit',
reference='ae1fe')
Update a git module
Bump module version
puppetfile.update_git_module('mymodule', '12.0.2')
You can also change a module reference type and its value.
For example you have a module deployed by its master branch and want to track it by a specific tag.
puppetfile.update_git_module('mymodule', '1.0.0', reference_type='tag')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for py_control_repository-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 126ae2f57bbb9be72a4d3c8a30865a86c0fdc07a2d165654a2452272f699f288 |
|
MD5 | 03ed0cb28a3c728792e97624696d3887 |
|
BLAKE2b-256 | beeab73e8d35768a40c257946e13a5d24a525610055b1dcd7fe9166194f2afd1 |