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:
parent
8215e403df
commit
f66268162d
@ -27,4 +27,5 @@ else
|
||||
return
|
||||
end
|
||||
|
||||
default[:pacemaker][:founder] = false
|
||||
default[:pacemaker][:crm][:initial_config_file] = "/etc/corosync/crm-initial.conf"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user