[icinga-checkins] icinga.org: chef-icinga2/master: Updated recipes to be more compatible with lint, and cleaned up comments

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


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

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

Updated recipes to be more compatible with lint, and cleaned up comments

---

 recipes/server_os_packages.rb |   18 +++++++++---------
 recipes/server_web2.rb        |    9 ++++-----
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/recipes/server_os_packages.rb b/recipes/server_os_packages.rb
index 76e2a13..eb9708d 100644
--- a/recipes/server_os_packages.rb
+++ b/recipes/server_os_packages.rb
@@ -26,22 +26,22 @@ case node['platform_family']
         # package libjpeg62-dev conflicts with libgd2-xpm-dev
         # 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 imagemagick
-                   php5-imagick php-pear php5-xmlrpc php5-xsl php5-mysql
-                   php-soap php5-gd php5-ldap php5-pgsql php5-intl)
+                      libgd2-xpm-dev libjpeg62 libpng12-0
+                      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 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)
+                      libgd2-xpm-dev libjpeg62 libpng12-0
+                      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
 
     apt_repository 'ondrej-php' do
       uri 'ppa:ondrej/php'
       distribution node['lsb']['codename']
-      only_if { node['lsb']['codename'] == 'xenial' } #That's Ubuntu 16 to you plebs
+      only_if { node['lsb']['codename'] == 'xenial' } # That's Ubuntu 16
     end
     include_recipe 'apt'
     os_packages.push('git-core') if node['icinga2']['web2']['install_method'] == 'source' && node['icinga2']['web2']['enable'] == true
diff --git a/recipes/server_web2.rb b/recipes/server_web2.rb
index 218961c..d594f88 100644
--- a/recipes/server_web2.rb
+++ b/recipes/server_web2.rb
@@ -51,13 +51,12 @@ end
 # set php time zone
 if node['platform_family'] == 'rhel'
   php_ini = '/etc/php.ini'
+elsif node['lsb']['codename'] == 'xenial'
+  php_ini = '/etc/php/5.5/apache2/php.ini'
 else
-  if node['lsb']['codename'] == 'xenial'
-    php_ini = '/etc/php/5.5/apache2/php.ini'
-  else
-    php_ini = '/etc/php5/apache2/php.ini'
-  end
+  php_ini = '/etc/php5/apache2/php.ini'
 end
+
 ruby_block 'set php timezone' do
   block do
     fe = Chef::Util::FileEdit.new(php_ini)



More information about the icinga-checkins mailing list