项目作者: tohuwabohu

项目描述 :
Run Puppet in masterless mode on a regular basis and notify on changes
高级语言: Ruby
项目地址: git://github.com/tohuwabohu/puppet-puppet.git
创建时间: 2014-04-10T12:45:48Z
项目社区:https://github.com/tohuwabohu/puppet-puppet

开源协议:Apache License 2.0

下载


puppet

Overview

Manage the Puppet package state and run Puppet in masterless mode on a regular basis. When changes are applied, a given
user can be notified via email.

By default, Puppet will be executed every 30 minutes and logs will be send to syslog. Before running Puppet, the APT
package index will be updated.

Usage

Install puppet and hiera.

  1. class { 'puppet': }

Install a specific version of puppet and hiera:

  1. class { 'puppet':
  2. puppet_ensure => '3.7.3-1puppetlabs1',
  3. hiera_ensure => '1.3.3-1puppetlabs1',
  4. }

Install puppet, hiera and the hiera backend hiera-eyaml:

  1. class { 'puppet':
  2. hiera_backend_package => 'hiera-eyaml',
  3. hiera_backend_ensure => '2.0.0',
  4. }

Notify root@example.com in case changes have been made:

  1. class { 'puppet':
  2. mail_to => 'root@example.com',
  3. }

Run puppet every six hours:

  1. class { 'puppet':
  2. cron_hour => '*/6',
  3. cron_minute => fqdn_rand(60),
  4. }

See the cron type reference for more information about
available cron options.

Or turn off the cron job completely

  1. class { 'puppet':
  2. cron_enable => false,
  3. }

Limitations

The module has been tested on the following operating systems. Testing and patches for other platforms are welcome.

  • Debian 6.0 (Squeeze)
  • Debian 7.0 (Wheezy)
  • Ubuntu 12.04 (Precise Pangolin)
  • Ubuntu 14.04 (Trusty Tahr)

Build Status

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Development

This project uses rspec-puppet and beaker to ensure the module works as expected and to prevent regressions.

  1. gem install bundler
  2. bundle install --path vendor
  3. bundle exec rake spec
  4. bundle exec rake beaker

(note: see Beaker - Supported ENV variables
for a list of environment variables to control the default behaviour of Beaker)