diff --git a/attributes/default.rb b/attributes/default.rb index 49bcd1e..8e4bff1 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -27,4 +27,5 @@ else return end +default[:pacemaker][:founder] = false default[:pacemaker][:crm][:initial_config_file] = "/etc/corosync/crm-initial.conf" diff --git a/metadata.rb b/metadata.rb index da2e096..ecb5fdd 100644 --- a/metadata.rb +++ b/metadata.rb @@ -5,3 +5,5 @@ license "Apache 2.0" description "Installs/configures Pacemaker" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version "0.1" + +depends "corosync" diff --git a/recipes/default.rb b/recipes/default.rb index ee85655..003b33e 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -18,4 +18,12 @@ # limitations under the License. # -include_recipe "pacemaker::setup" +if Chef::Config[:solo] + ::Chef::Log.warn "Using Chef Solo, you are expected to manually include the corosync default recipe!" +else + include_recipe "corosync::default" +end + +if node[:pacemaker][:founder] + include_recipe "pacemaker::setup" +end