libioc.Provisioning.puppet module

ioc provisioner for use with puppet apply.

class libioc.Provisioning.puppet.ControlRepoDefinition(source, logger)[source]

Bases: dict

Puppet control-repo definition.

property pkgs

Return list of packages required for this Provisioning method.

Return type

List[str]

property source

Return the Puppet Control-Repo URL.

Return type

Source

exception libioc.Provisioning.puppet.ControlRepoUnavailableError(url, reason, logger=None)[source]

Bases: libioc.errors.IocException

Raised when the puppet control-repo is not available.

class libioc.Provisioning.puppet.PuppetApplyEvent(jail, message=None, scope=None)[source]

Bases: libioc.events.JailEvent

Apply the puppet manifest.

class libioc.Provisioning.puppet.R10kDeployEvent(jail, message=None, scope=None)[source]

Bases: libioc.events.JailEvent

Deploy control repo and install puppet modules.

libioc.Provisioning.puppet.provision(self, event_scope=None)[source]

Provision the jail with Puppet apply using the supplied control-repo.

The repo can either be a filesystem path, or a http[s]/git URL. If the repo is a filesystem path, it will be mounted to /usr/local/etc/puppet/environments. If the repo is a URL, we will setup a ZFS dataset and mount that to /usr/local/etc/puppet/environments, before deploying it with r10k.

Example

ioc set

provision.method=puppet provision.source=http://github.com/bsdci/puppet-control-repo webserver

This should install a webserver that listens on port 80, and delivers a Hello-World HTML site.

Return type

Generator[IocEvent, None, None]