Skip to content

Instantly share code, notes, and snippets.

@mhalligan
Created November 2, 2011 23:14
Show Gist options
  • Select an option

  • Save mhalligan/1335259 to your computer and use it in GitHub Desktop.

Select an option

Save mhalligan/1335259 to your computer and use it in GitHub Desktop.
class puppet::agent {
service { 'puppet':
ensure => running,
enable => true,
hasrestart => true,
hasstatus => true,
subscribe => File['/etc/puppet/puppet.conf'],
}
file {'/etc/puppet/auth.conf':
ensure => file,
content => template('puppet/auth.conf-agent.erb'),
mode => '0644';
}
}
class puppet::master inherits puppet::agent {
file { '/etc/puppet/agent.conf':
content => template('puppet/auth.conf-master.erb'),
}
service { 'puppetmaster':
ensure => running,
enable => true,
hasrestart => true,
hasstatus => true,
subscribe => [File['/etc/puppet/puppet.conf'],File['/etc/puppet/auth.conf']],
}
}
node default {
class { puppet:
stage => pre
}
}
node app-01 inherits default {
include puppet::agent
}
node pm-01 inherits default {
include puppet::master
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment