[icinga-checkins] icinga.org: chef-icinga2/master: Cleaned up Aptitude/ Yum package declarations based on vkhatri's recommendations

git at icinga.org git at icinga.org
Sun Nov 13 07:53:39 CET 2016


Module: chef-icinga2
Branch: master
Commit: c6539207540be3c42248db02e5aa24837279ebb2
URL:    https://git.icinga.org/?p=chef-icinga2.git;a=commit;h=c6539207540be3c42248db02e5aa24837279ebb2

Author: Cody Sandwith <csandwith at topiatechnology.com>
Date:   Mon Oct  3 08:47:52 2016 -0700

Cleaned up Aptitude/Yum package declarations based on vkhatri's recommendations

---

 recipes/server_os_packages.rb |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/recipes/server_os_packages.rb b/recipes/server_os_packages.rb
index ca750b1..76e2a13 100644
--- a/recipes/server_os_packages.rb
+++ b/recipes/server_os_packages.rb
@@ -1,4 +1,3 @@
-# frozen_string_literal: true
 #
 # Cookbook Name:: icinga2
 # Recipe:: server_os_packages
@@ -28,13 +27,13 @@ case node['platform_family']
         # perhaps can be removed.
         os_packages = %w(g++ mailutils php5 php5-cli php5-fpm build-essential
                    libgd2-xpm-dev libjpeg62 libpng12-0
-                   libpng12-dev libapache2-mod-php5 git-core imagemagick
+                   libpng12-dev libapache2-mod-php5 imagemagick
                    php5-imagick php-pear php5-xmlrpc php5-xsl php5-mysql
                    php-soap php5-gd php5-ldap php5-pgsql php5-intl)
       when 'xenial'
         os_packages = %w(g++ mailutils php5.5 php5.5-cli php5.5-fpm build-essential
                    libgd2-xpm-dev libjpeg62 libpng12-0
-                   libpng12-dev libapache2-mod-php5.5 git-core imagemagick
+                   libpng12-dev libapache2-mod-php5.5 imagemagick
                    php5.5-imagick php-pear php5.5-xmlrpc php5.5-xsl php5.5-mysql
                    php-soap php5.5-gd php5.5-ldap php5.5-pgsql php5.5-intl)
     end
@@ -45,13 +44,15 @@ case node['platform_family']
       only_if { node['lsb']['codename'] == 'xenial' } #That's Ubuntu 16 to you plebs
     end
     include_recipe 'apt'
+    os_packages.push('git-core') if node['icinga2']['web2']['install_method'] == 'source' && node['icinga2']['web2']['enable'] == true
   when 'rhel'
     os_packages = %w(gcc gcc-c++ glibc glibc-common mailx php php-devel gd
                    gd-devel libjpeg libjpeg-devel libpng libpng-devel php-gd
                    php-fpm php-cli php-pear php-xmlrpc php-xsl php-pdo
                    php-soap php-ldap php-mysql php-pgsql php-intl git php-pecl-imagick)
-# yum epel repository is required for php-pecl-imagick
+    # yum epel repository is required for php-pecl-imagick
     include_recipe 'yum-epel' if node['platform'] != 'amazon' && node['icinga2']['setup_epel']
+    os_packages.push('git') if node['icinga2']['web2']['install_method'] == 'source' && node['icinga2']['web2']['enable'] == true
 end
 
 # dependencies



More information about the icinga-checkins mailing list