diff --git a/.kitchen.yml b/.kitchen.yml index 0aee5f2..e44f1d1 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -1,5 +1,7 @@ --- <% + http_port = ENV['KITCHEN_ICINGA2_HTTP_PORT'] || 8080 + https_port = ENV['KITCHEN_ICINGA2_HTTPS_PORT'] || 8443 db_host = ENV['KITCHEN_DB_HOST'] || 'localhost' chef_omnibus_url = ENV['KITCHEN_CHEF_OMNIBUS_URL'] || nil %> @@ -32,8 +34,8 @@ suites: - name: web2-package driver: network: - - ["forwarded_port", {guest: 80, host: 8080, auto_correct: true}] - - ["forwarded_port", {guest: 443, host: 8443, auto_correct: true}] + - ["forwarded_port", {guest: 80, host: <%= http_port %>, auto_correct: true}] + - ["forwarded_port", {guest: 443, host: <%= https_port %>, auto_correct: true}] run_list: - recipe[icinga2::server] - recipe[icinga2-test::default] @@ -49,8 +51,8 @@ suites: - name: web2-source driver: network: - - ["forwarded_port", {guest: 80, host: 8080, auto_correct: true}] - - ["forwarded_port", {guest: 443, host: 8443, auto_correct: true}] + - ["forwarded_port", {guest: 80, host: <%= http_port %>, auto_correct: true}] + - ["forwarded_port", {guest: 443, host: <%= https_port %>, auto_correct: true}] run_list: - recipe[icinga2::server] - recipe[icinga2-test::default] @@ -66,8 +68,8 @@ suites: - name: classicui driver: network: - - ["forwarded_port", {guest: 80, host: 8080, auto_correct: true}] - - ["forwarded_port", {guest: 443, host: 8443, auto_correct: true}] + - ["forwarded_port", {guest: 80, host: <%= http_port %>, auto_correct: true}] + - ["forwarded_port", {guest: 443, host: <%= https_port %>, auto_correct: true}] run_list: - recipe[icinga2::server] - recipe[icinga2-test::default] diff --git a/.rubocop.yml b/.rubocop.yml index 7a3e9a4..36298cb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -33,3 +33,5 @@ AbcSize: Enabled: false BlockLength: Enabled: false +BlockNesting: + Max: 4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 52673e1..ac4e44e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ icinga2 CHANGELOG This file is used to list changes made in each version of the icinga2 cookbook. -unlreleased +2.9.2 ----- - Virender Khatri - Added .ignore directory to ignore @@ -62,6 +62,10 @@ unlreleased - Virender Khatri - Issue #262, use dependency cookbooks latest version +- Virender Khatri - Issue #267, update packages version to 2.6.1 + +- Virender Khatri - Issue #266, Updated kitchen to allow ports override + 2.9.1 ----- diff --git a/README.md b/README.md index 6a57293..51f28df 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ icinga2 Cookbook ================== -[![Cookbook](http://img.shields.io/badge/cookbook-v2.9.1-green.svg)](https://github.com/icinga/chef-icinga2) [![Build Status](https://travis-ci.org/Icinga/chef-icinga2.svg?branch=master)](https://travis-ci.org/Icinga/chef-icinga2)[![Build Status](https://jenkins-01.eastus.cloudapp.azure.com/job/icinga2-cookbook/badge/icon)](https://jenkins-01.eastus.cloudapp.azure.com/job/icinga2-cookbook/) +[![Cookbook](https://img.shields.io/github/tag/icinga/chef-icinga2.svg)](https://github.com/icinga/chef-icinga2) [![Build Status](https://travis-ci.org/Icinga/chef-icinga2.svg?branch=master)](https://travis-ci.org/Icinga/chef-icinga2)[![Build Status](https://jenkins-01.eastus.cloudapp.azure.com/job/icinga2-cookbook/badge/icon)](https://jenkins-01.eastus.cloudapp.azure.com/job/icinga2-cookbook/) ![Icinga Logo](https://www.icinga.com/wp-content/uploads/2014/06/icinga_logo.png) @@ -1994,7 +1994,7 @@ Above LWRP resource will apply `Dependency` to all `Host` objects for provided ` ## Cookbook Core Attributes -* `default['icinga2']['version']` (default: `2.6.0-X, calculated`): icinga2 version +* `default['icinga2']['version']` (default: `2.6.1-X, calculated`): icinga2 version * `default['icinga2']['conf_dir']` (default: `/etc/icinga2`): icinga2 configuration location @@ -2221,7 +2221,7 @@ Above LWRP resource will apply `Dependency` to all `Host` objects for provided ` * `default['icinga2']['classic_ui']['enable']` (default: `false`): setup icinga2 classic-ui if set true -* `default['icinga2']['classic_ui']['version']` (default: `2.6.0-1`): icinga2 classic-ui package version +* `default['icinga2']['classic_ui']['version']` (default: `2.6.1-1`): icinga2 classic-ui package version * `default['icinga2']['classic_ui']['gui_version']` (default: `1.14.0-0`): icinga2 gui package version diff --git a/attributes/default.rb b/attributes/default.rb index 969e4f5..29f3730 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -2,8 +2,8 @@ # http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/getting-started#getting-started default['icinga2']['version'] = value_for_platform( - %w(centos redhat fedora amazon) => { 'default' => '2.6.0-1' }, - %w(debian ubuntu) => { 'default' => '2.6.0-2' } + %w(centos redhat fedora amazon) => { 'default' => '2.6.1-1' }, + %w(debian ubuntu) => { 'default' => '2.6.1-1' } ) default['icinga2']['enable_env_pki'] = false diff --git a/attributes/repo.rb b/attributes/repo.rb index 5804ada..ea4c1c0 100644 --- a/attributes/repo.rb +++ b/attributes/repo.rb @@ -50,7 +50,7 @@ default['icinga2']['apt']['key'] = '36862847' # icinga2 package version suffix - default['icinga2']['icinga2_version_suffix'] = '~ppa1~' + node['lsb']['codename'].to_s + '2' + default['icinga2']['icinga2_version_suffix'] = '~ppa1~' + node['lsb']['codename'].to_s + '1' end when 'debian' default['icinga2']['apt']['keyserver'] = nil @@ -75,11 +75,11 @@ default['icinga2']['apt']['key'] = 'http://debmon.org/debmon/repo.key' # icinga2 package version suffix - if node['platform_version'] > '7' - default['icinga2']['icinga2_version_suffix'] = '~debmon' + node['platform_version'].split('.')[0] + '+1' - else - default['icinga2']['icinga2_version_suffix'] = '~debmon' + node['platform_version'].split('.')[0] + '0+1' - end + default['icinga2']['icinga2_version_suffix'] = if node['platform_version'] > '7' + '~debmon' + node['platform_version'].split('.')[0] + '+1' + else + '~debmon' + node['platform_version'].split('.')[0] + '0+1' + end end end end diff --git a/attributes/server_classic_ui.rb b/attributes/server_classic_ui.rb index e0031c0..9c54661 100644 --- a/attributes/server_classic_ui.rb +++ b/attributes/server_classic_ui.rb @@ -10,8 +10,8 @@ ) default['icinga2']['classic_ui']['version'] = value_for_platform( - %w(centos redhat fedora amazon) => { 'default' => '2.6.0-1' }, - %w(debian ubuntu) => { 'default' => '2.6.0-2' } + %w(centos redhat fedora amazon) => { 'default' => '2.6.1-1' }, + %w(debian ubuntu) => { 'default' => '2.6.1-1' } ) default['icinga2']['classic_ui']['gui_version'] = '1.14.0-0' diff --git a/metadata.rb b/metadata.rb index bab392c..e26038c 100644 --- a/metadata.rb +++ b/metadata.rb @@ -5,7 +5,7 @@ license 'Apache 2.0' description 'Installs/Configures Icinga2' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.9.1' +version '2.9.2' source_url 'https://github.com/Icinga/chef-icinga2' if respond_to?(:source_url) issues_url 'https://dev.icinga.org/projects/chef-icinga2' if respond_to?(:issues_url)