Skip to content

Instantly share code, notes, and snippets.

@torrancew
Created November 4, 2011 19:10
Show Gist options
  • Save torrancew/1340203 to your computer and use it in GitHub Desktop.
Save torrancew/1340203 to your computer and use it in GitHub Desktop.
class puppet::configure ($puppet_type = 'agent', $environment = 'production', $confdir = '/etc/puppet',
$logdir = '/var/log/puppet', $vardir = '/var/lib/puppet',
$rundir = '/var/run/puppet', $ssldir = '/var/lib/puppet/ssl',
$storeconfigs = false, $dbadapter = undef, $dbconnections = 3,
$dbserver = undef, $dbname = puppet, $dbuser = puppet, $dbpassword = puppet) {
include puppet::install
$environment_list = [ 'development', 'testing', 'production' ]
file {
$confdir:
ensure => directory,
owner => root,
group => root,
mode => 0755,
require => Class['puppet::install'];
$logdir:
ensure => directory,
owner => puppet,
group => puppet,
mode => 0755,
require => File[$confdir];
$vardir:
ensure => directory,
owner => puppet,
group => puppet,
mode => 0755,
require => File[$confdir];
$rundir:
ensure => directory,
owner => puppet,
group => puppet,
mode => 1777,
require => File[$confdir];
$ssldir:
ensure => directory,
owner => puppet,
group => root,
mode => 0771,
require => File[$vardir];
"${confdir}/puppet.conf":
ensure => present,
owner => root,
group => root,
mode => 0640,
content => template('puppet/puppet.conf.erb'),
require => File[$confdir];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment