From a969e4cb50c9ba543a5c62b8b34ce0a40dfb123c Mon Sep 17 00:00:00 2001 From: Jonathan Gnagy Date: Fri, 13 Nov 2015 14:03:31 -0700 Subject: [PATCH 1/2] Adding option to not install the uchiwa package This allows installing versions not yet in the sensuapp repo manually. --- manifests/init.pp | 7 +++++++ manifests/install.pp | 10 ++++++---- manifests/params.pp | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index f5bc008..3275042 100755 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -47,6 +47,11 @@ # Default: http://repos.sensuapp.org/apt/pubkey.gpg # GPG key for the repo we're installing # +# [*install_package*] +# Boolean +# Default: true +# Should we install the package from the repo? +# # [*manage_services*] # Boolean # Default: true @@ -104,6 +109,7 @@ $repo_source = $uchiwa::params::repo_source, $repo_key_id = $uchiwa::params::repo_key_id, $repo_key_source = $uchiwa::params::repo_key_source, + $install_package = $uchiwa::params::install_package, $manage_services = $uchiwa::params::manage_services, $manage_user = $uchiwa::params::manage_user, $host = $uchiwa::params::host, @@ -116,6 +122,7 @@ # validate parameters here validate_bool($install_repo) + validate_bool($install_package) validate_bool($manage_services) validate_bool($manage_user) validate_string($package_name) diff --git a/manifests/install.pp b/manifests/install.pp index 9821160..f7f293d 100755 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -38,10 +38,12 @@ } } - package { $uchiwa::package_name: - ensure => $uchiwa::version, - require => $repo_require, - notify => Service['uchiwa'], + if ($uchiwa::install_package) { + package { $uchiwa::package_name: + ensure => $uchiwa::version, + require => $repo_require, + notify => Service['uchiwa'], + } } } diff --git a/manifests/params.pp b/manifests/params.pp index 1683e08..ba18317 100755 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -25,6 +25,7 @@ $repo_key_id = '8911D8FF37778F24B4E726A218609E3D7580C77F' $repo_key_source = 'http://repos.sensuapp.org/apt/pubkey.gpg' $manage_services = true + $install_package = true $manage_user = true $sensu_api_endpoints = [ From 8ffdeb89740af812ab0ea3508f76b5df1f9cc88d Mon Sep 17 00:00:00 2001 From: Jonathan Gnagy Date: Wed, 18 Nov 2015 23:47:06 -0800 Subject: [PATCH 2/2] Changing 'install_package' to 'manage_package' --- manifests/init.pp | 6 +++--- manifests/install.pp | 2 +- manifests/params.pp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 3275042..28f2e0d 100755 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -47,7 +47,7 @@ # Default: http://repos.sensuapp.org/apt/pubkey.gpg # GPG key for the repo we're installing # -# [*install_package*] +# [*manage_package*] # Boolean # Default: true # Should we install the package from the repo? @@ -109,7 +109,7 @@ $repo_source = $uchiwa::params::repo_source, $repo_key_id = $uchiwa::params::repo_key_id, $repo_key_source = $uchiwa::params::repo_key_source, - $install_package = $uchiwa::params::install_package, + $manage_package = $uchiwa::params::manage_package, $manage_services = $uchiwa::params::manage_services, $manage_user = $uchiwa::params::manage_user, $host = $uchiwa::params::host, @@ -122,7 +122,7 @@ # validate parameters here validate_bool($install_repo) - validate_bool($install_package) + validate_bool($manage_package) validate_bool($manage_services) validate_bool($manage_user) validate_string($package_name) diff --git a/manifests/install.pp b/manifests/install.pp index f7f293d..7548baf 100755 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -38,7 +38,7 @@ } } - if ($uchiwa::install_package) { + if ($uchiwa::manage_package) { package { $uchiwa::package_name: ensure => $uchiwa::version, require => $repo_require, diff --git a/manifests/params.pp b/manifests/params.pp index ba18317..2f6eaba 100755 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -25,7 +25,7 @@ $repo_key_id = '8911D8FF37778F24B4E726A218609E3D7580C77F' $repo_key_source = 'http://repos.sensuapp.org/apt/pubkey.gpg' $manage_services = true - $install_package = true + $manage_package = true $manage_user = true $sensu_api_endpoints = [