Forge Home


Devopera common base configuration module


9,956 latest version

0.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.9.3 (latest)
  • 0.9.1
  • 0.9.0
released Jun 24th 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'devopera-docommon', '0.9.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add devopera-docommon
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install devopera-docommon --version 0.9.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



devopera/docommon — version 0.9.3 Jun 24th 2014


The Devopera suite of modules rely on a minimal common infrastructure, such as an SSH server, at least one non-service-specific user to administer files etc.



  • Added docommon::seport to expose ports for SELinux using blentz/selinux_types


  • Added docommon::setperms to apply permissions to a directory structure


  • Added screen package as a useful way of setting processes to run within a context


  • Prepared module for release on Puppet Forge, setup containment relationships for subclasses


  • Introduced findcrontab to allow dorepos::installapp to setup cron tasks


  • Fixed bug in docommon::harden as cannot assign value to variable $name


  • Added Compass for compiling .sass and vim/ack for general maintenance, only on dev profile (docommon::dev)


  • Introduced docommon::fireport defined resource to allow firewall definitions in the puppetlabs/firewall or example42/firewall formats


  • Moved firewall port opening out to firewall.pp and virtualised; adopted example42 firewall standard


  • By default, each host should know itself as, so added to /etc/hosts setup using hosts array


  • Split list of hardened binaries; only su needs to run as root


  • Tweaked custom fact to find puppetmaster ipaddress even if setup as alias (not first list entry) in /etc/hosts


  • Modified runonce to write notifications to a parameterised ${notifier_dir}, modified findrunonce to dump output to /dev/null unless target specified


Setup system common elements

class { 'docommon' : }

Give the standard user a different username, set email and password (using hash), tell SSH to run on non-standard port

class { 'docommon':
  user => 'fred',
  user_email => '',
  # hash of fred's password "admLn**"
  user_pass_hash => '',
  ssh_port => 15222,

Setup a couple of standard directories for storing apps (see dorepos::installapp) and GitHub as a known host

class { 'docommon' :
  webfile =>
    '/var/www/git' => { },
    '/var/www/git/' => { },
  known_hosts => {
    '' => {
      host_aliases => ['',''],
      type => 'ssh-rsa',
      key => "AAAAB3Nz=an=example=key==",

Tell docommon to use example42's firewall module instead of puppetlabs'

class { 'docommon' :
  firewall_module => 'example42',

Setup entries in /etc/ssh/config to make SSH access to other machines using non-standard SSH ports easy

class { 'docommon' :
  ssh_servers => [
      'host' => 'our-svn',
      'hostname' => '',
      'user' => 'svnuser',
      'port' => 522,
      'host' => 'our-backup',
      'hostname' => '',
      'user' => $user,
      'port' => 15022,

Create a directory or ensure that one exists, but don't overwrite symlinks

docommon::createdir { ['/tmp/one', '/tmp/one/two', '/tmp/one/two/three']:
  owner => 'web',
  group => 'www-data',

Operating System support

Tested with CentOS 6, Ubuntu 12.04

Copyright and Licence

Copyright 2012 Lightenna Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.