From 615c663df68aafa3d9f6af603cc76917975feb1c Mon Sep 17 00:00:00 2001 From: Cyberflow Date: Tue, 5 Mar 2019 10:43:18 +0200 Subject: [PATCH 1/2] check version of icinga for install libicinga2 --- recipes/install.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/install.rb b/recipes/install.rb index 53e3444..bd84675 100644 --- a/recipes/install.rb +++ b/recipes/install.rb @@ -38,7 +38,7 @@ version node['icinga2']['version'] + node['icinga2']['version_suffix'] unless node['icinga2']['ignore_version'] options node['icinga2']['package_options'] action :install - end + end if Gem::Version.new(node['icinga2']['version']) < Gem::Version.new('2.10') end package 'icinga2-doc' do From dce08afa6cdefdaaddbff8265a10e512adc025e1 Mon Sep 17 00:00:00 2001 From: Cyberflow Date: Tue, 5 Mar 2019 11:41:16 +0200 Subject: [PATCH 2/2] chenge unit test for version 2.10 --- spec/unit/recipes/default_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/recipes/default_spec.rb b/spec/unit/recipes/default_spec.rb index 38e9d3e..ff74f39 100644 --- a/spec/unit/recipes/default_spec.rb +++ b/spec/unit/recipes/default_spec.rb @@ -230,7 +230,7 @@ expect(chef_run).to remove_apt_repository('icinga2-snapshot') end - %w(g++ mailutils build-essential libicinga2).each do |p| + %w(g++ mailutils build-essential).each do |p| it 'install packages' do expect(chef_run).to install_package(p) end