Skip to content

Commit

Permalink
Make APT repo not mandatory
Browse files Browse the repository at this point in the history
Refactored sensu::debian to be more flexible, now declaring
a sensu::debian class you can remove the repository or
setup the unstable repo, i.e.

  class { 'sensu::debian': ensure => 'absent' }
  class { 'sensu::debian': repo => 'unstable }
  • Loading branch information
Alexander Fortin committed Jul 5, 2012
1 parent a27c18a commit a490986
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions manifests/debian.pp
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@

class sensu::debian {
#
# Add APT key and repository
#
# == Parameters:
#
# $ensure:: 'present' or 'absent'
# $repo:: 'main' or 'unstable'
#
class sensu::debian (
$ensure = 'present',
$repo = 'main'
) {

sensu::apt::key { 'Sensu':
ensure => 'present',
url => 'http://repos.sensuapp.org/apt/pubkey.gpg',
}

sensu::apt::source { 'sensuapp':
ensure => 'present',
content => 'deb http://repos.sensuapp.org/apt sensu main',
ensure => $ensure,
content => "deb http://repos.sensuapp.org/apt sensu ${repo}",
require => Sensu::Apt::Key['Sensu'],
}

Expand Down

0 comments on commit a490986

Please sign in to comment.