Skip to content

Commit

Permalink
Merge pull request #69 from aquto/master
Browse files Browse the repository at this point in the history
Added template support for /etc/default/sensu
  • Loading branch information
jamtur01 committed Apr 23, 2013
2 parents ad01611 + fc38664 commit 60096a8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
10 changes: 6 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
$client_name = $::fqdn,
$plugins = [],
$purge_config = false,
$use_embedded_ruby = false,
){

Class['sensu::package'] ->
Expand Down Expand Up @@ -61,10 +62,11 @@
}

class { 'sensu::package':
version => $version,
install_repo => $install_repo,
notify_services => $notify_services,
purge_config => $purge_config,
version => $version,
install_repo => $install_repo,
notify_services => $notify_services,
purge_config => $purge_config,
use_embedded_ruby => $use_embedded_ruby,
}

class { 'sensu::rabbitmq':
Expand Down
12 changes: 12 additions & 0 deletions manifests/package.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
$notify_services = [],
$install_repo = 'true',
$purge_config = 'false',
$use_embedded_ruby = 'true',
) {

if $install_repo == 'true' or $install_repo == true {
Expand All @@ -29,6 +30,17 @@
}
}

file { 'sensu':
ensure => file,
path => '/etc/default/sensu',
content => template("${module_name}/sensu.erb"),
owner => '0',
group => '0',
mode => '0644',
require => Package['sensu'],
notify => $notify_services,
}

file { ['/etc/sensu/plugins', '/etc/sensu/handlers']:
ensure => directory,
mode => '0555',
Expand Down
2 changes: 2 additions & 0 deletions templates/sensu.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EMBEDDED_RUBY=<%= use_embedded_ruby %>

0 comments on commit 60096a8

Please sign in to comment.