From 99c7130e61207547d0b70fce1dcd81aba50d6d5e Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 27 Feb 2014 11:02:48 +0100 Subject: [PATCH] Install pacemaker packages before corosync That way, pacemaker is already there when we start corosync, which is something that we need. --- recipes/default.rb | 14 ++++++++++++++ recipes/setup.rb | 16 ---------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 003b33e..3d9cd29 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -18,6 +18,20 @@ # limitations under the License. # +node[:pacemaker][:platform][:packages].each do |pkg| + package pkg +end + +# required to run hb_gui +if platform_family? "suse" + cmd = "SuSEconfig --module gtk2" + execute cmd do + user "root" + command cmd + not_if { File.exists? "/etc/gtk-2.0/gdk-pixbuf64.loaders" } + end +end + if Chef::Config[:solo] ::Chef::Log.warn "Using Chef Solo, you are expected to manually include the corosync default recipe!" else diff --git a/recipes/setup.rb b/recipes/setup.rb index ef5bb06..29a747f 100644 --- a/recipes/setup.rb +++ b/recipes/setup.rb @@ -18,12 +18,6 @@ # limitations under the License. # -node[:pacemaker][:platform][:packages].each do |pkg| - package pkg do - action :install - end -end - crm_conf = node[:pacemaker][:crm][:initial_config_file] template crm_conf do source "crm-initial.conf.erb" @@ -45,13 +39,3 @@ if platform_family? "rhel" notifies :restart, "service[clvm]", :immediately end end - -# required to run hb_gui -if platform_family? "suse" - cmd = "SuSEconfig --module gtk2" - execute cmd do - user "root" - command cmd - not_if { File.exists? "/etc/gtk-2.0/gdk-pixbuf64.loaders" } - end -end