From 99bbadbd8e397cc11238744c299809f11ef93f8a Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Tue, 19 Aug 2014 14:36:00 +0100 Subject: [PATCH 1/5] Add condition if install repo is false --- manifests/package.pp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/manifests/package.pp b/manifests/package.pp index c770991dff..78b7c65cc1 100644 --- a/manifests/package.pp +++ b/manifests/package.pp @@ -24,9 +24,14 @@ } + package { 'sensu': - ensure => $sensu::version, - require => $repo_require, + if $sensu::install_repo == 'true' { + ensure => $sensu::version, + require => $repo_require, + } else { + ensure => $sensu::version, + } } package { 'sensu-plugin' : From 96afbb191cfa7b000d0460654f5bfddfe8651640 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Tue, 19 Aug 2014 15:20:02 +0100 Subject: [PATCH 2/5] Syntax error at if statement --- manifests/package.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/package.pp b/manifests/package.pp index 78b7c65cc1..4db602273f 100644 --- a/manifests/package.pp +++ b/manifests/package.pp @@ -24,9 +24,9 @@ } - + package { 'sensu': - if $sensu::install_repo == 'true' { + if $sensu::install_repo { ensure => $sensu::version, require => $repo_require, } else { From a1658405c765c391e9416cd72cdf9eda940b04d1 Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Tue, 19 Aug 2014 15:35:06 +0100 Subject: [PATCH 3/5] Syntax error at if statement --- manifests/package.pp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/manifests/package.pp b/manifests/package.pp index 4db602273f..d15c5b71ac 100644 --- a/manifests/package.pp +++ b/manifests/package.pp @@ -24,14 +24,16 @@ } + if $sensu::install_repo { + $use_repo = $repo_require + } else { + $use_repo = false + } + package { 'sensu': - if $sensu::install_repo { - ensure => $sensu::version, - require => $repo_require, - } else { - ensure => $sensu::version, - } + ensure => $sensu::version, + require => $use_repo, } package { 'sensu-plugin' : From fc673d79f3aed0b82272293d8b60fe2c024b879a Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Tue, 19 Aug 2014 15:38:04 +0100 Subject: [PATCH 4/5] Syntax error at if statement --- manifests/package.pp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/manifests/package.pp b/manifests/package.pp index d15c5b71ac..c25202fa44 100644 --- a/manifests/package.pp +++ b/manifests/package.pp @@ -24,16 +24,8 @@ } - if $sensu::install_repo { - $use_repo = $repo_require - } else { - $use_repo = false - } - - package { 'sensu': ensure => $sensu::version, - require => $use_repo, } package { 'sensu-plugin' : From 83d5c38a0fef2862215dae421e672778e9b50b5c Mon Sep 17 00:00:00 2001 From: Cam Parry Date: Tue, 19 Aug 2014 15:56:17 +0100 Subject: [PATCH 5/5] Add directories to be owned by sensu --- manifests/package.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/package.pp b/manifests/package.pp index c25202fa44..024cf74df0 100644 --- a/manifests/package.pp +++ b/manifests/package.pp @@ -53,7 +53,7 @@ require => Package['sensu'], } - file { ['/etc/sensu/plugins', '/etc/sensu/handlers']: + file { ['/etc/sensu/plugins', '/etc/sensu/handlers', '/etc/sensu/extensions', '/etc/sensu/mutators', '/etc/sensu/extensions/handlers']: ensure => directory, mode => '0555', owner => 'sensu',