From 5d4b5a801adc2f310fb425a04eb74bcdacac8bb8 Mon Sep 17 00:00:00 2001 From: MartinLewisNvm Date: Fri, 29 Jan 2016 10:39:00 +0000 Subject: [PATCH] Changed package resource to yum_package to allow package downgrade of opsview agent. - Default is false and can be controlled via attribute default['yum']['yum_package']['allow_downgrade']. Reviewed by Christian Clarke --- CHANGELOG.md | 4 ++++ attributes/setup_rhel_agent.rb | 2 ++ metadata.rb | 2 +- recipes/setup_rhel_agent.rb | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d44f624..cf580d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ opsview_client CHANGELOG ======================== This file is used to list changes made in each version of the opsview_client cookbook. +1.0.6 +----- +- Martin Lewis - Changed package resource to yum_package to allow package downgrade of opsview agent. +- Default is false and can be controlled via attribute default['yum']['yum_package']['allow_downgrade'] 1.0.5 ----- diff --git a/attributes/setup_rhel_agent.rb b/attributes/setup_rhel_agent.rb index 652bf00..2495d48 100644 --- a/attributes/setup_rhel_agent.rb +++ b/attributes/setup_rhel_agent.rb @@ -15,6 +15,8 @@ default['yum']['opsview-core']['repositoryid'] = 'opsview-core' default['yum']['opsview-core']['description'] = 'Opsview Core - $basearch' +default['yum']['yum_package']['allow_downgrade'] = false + # specify which packages (and specific versions, if needed) to install default['opsview']['agent']['packages'] = { 'libmcrypt' => nil, diff --git a/metadata.rb b/metadata.rb index 6aeaa95..779aad2 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Installs/Configures opsview agent' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '1.0.5' +version '1.0.6' depends 'build-essential' depends 'yum' diff --git a/recipes/setup_rhel_agent.rb b/recipes/setup_rhel_agent.rb index 4c4427c..1bceac3 100644 --- a/recipes/setup_rhel_agent.rb +++ b/recipes/setup_rhel_agent.rb @@ -35,7 +35,8 @@ # Install packages node['opsview']['agent']['packages'].each do |pkg,ver| - package pkg do #~FC009 + yum_package pkg do #~FC009 + allow_downgrade node['yum']['yum_package']['allow_downgrade'] action :install version ver if ver options '--nogpgcheck'