Deploy Puppet Code via modules.yaml
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.coveragerc
.gitignore
.pylintrc
.travis.yml
README.md
nfpm.yaml
postrun.py
pytest.ini
requirements.txt

README.md

Build Status Coverage Status

Postrun

Deploys Puppet modules from modules.yaml

Prerequisite

Vagrant

To deploy local modules and Hiera data in Vagrant the files need to places under:

  • /opt/puppet/modules
  • /opt/puppet/hiera

modules.yaml

The postrun script requires a modules.yaml file for each environment in /etc/puppetlabs/code/environments/environment_name/modules.yaml

The modules.yaml file lists a location and the Puppet modules for this location. Example:

modules:
  location_name:
    module_name:
      url: 'https://github.com/foobar.git'
      ref: branch'

Usage

Getting help:

/etc/puppetlabs/r10k/postrun/postrun.py -h

Running the postrun script:

/etc/puppetlabs/r10k/postrun/postrun.py

Running the postrun script verbose:

/etc/puppetlabs/r10k/postrun/postrun.py -v

Logging

The script writes all messages to stdout and into a logfile /var/log/postrun.log.

Package

Build a (Debian) package for this executable by using nfpm:

nfpm pkg --target postrun.deb

Testing and Development

Installing requirements:

pip install -r tests/requirements.txt

Running tests:

py.test

Running tests with coverage:

py.test --cov=postrun tests/