Skip to main content

Molule to manage Puppet control repository hosted on Github

Project description

https://travis-ci.org/othalla/py-control-repository.svg?branch=master https://badge.fury.io/py/py-control-repository.svg https://codecov.io/gh/othalla/py-control-repository/branch/master/graph/badge.svg

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_environent('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')

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')

Project details


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

py_control_repository-0.2.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page