Puppet on Ubuntu Configuration Notes

Knowing I will be working with a cluster of Ubuntu servers that should be identically configured, I decided to teach myself Puppet to simplify the deployment of packages and configurations. Below are some notes on the configuration of the various files. I used NTP as a nice, simple test for a simple service that should be deployed and configured identically on each host.


include "ntp" 

node default {
  include empty
  include ntp

node 'server1.domain.com' inherits default {
  include othermodule1

node 'server2' inherits default {
  include othermodule2

class ntp {
    notify{"puppet ntp module": }
    package {
            ensure => installed

    file {
            mode => 644,
            owner => root,
            group => root,
            path => "/etc/ntp.conf",
            source => "puppet:///modules/ntp/ntp.conf",
            require => Package["ntp"],

    service {
            ensure => running,
            enable => true,
            subscribe => [ File["ntp.conf"], Package [ntp] ],
            require => Package["ntp"],

 ( your desired ntp.conf file )

The "empty" module was created initially to get rid of the error:

Failed to retrieve current state of resource: undefined method `closed?' for nil:NilClass Could not retrieve file metadata for puppet://puppet/plugins: undefined method `closed?' for nil:NilClass