Simplify roles a bit

We now have an attribute that helps us know when a node is a founder or
not. The end goal will be to get rid of the founder role and have the
wrapper (for instance, crowbar) set this attribute on one node.

This also allows installing pacemaker before corosync, avoiding issues
where corosync doesn't know about pacemaker.
This commit is contained in:
Vincent Untz 2014-02-27 11:01:18 +01:00
parent 8215e403df
commit f66268162d
3 changed files with 12 additions and 1 deletions

View File

@ -27,4 +27,5 @@ else
return
end
default[:pacemaker][:founder] = false
default[:pacemaker][:crm][:initial_config_file] = "/etc/corosync/crm-initial.conf"

View File

@ -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"

View File

@ -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