initial crm configuration
This commit is contained in:
parent
a68a0d81fc
commit
7fcb8f5c34
@ -20,6 +20,8 @@ else
|
||||
default[:pacemaker][:platform][:packages] = %w()
|
||||
end
|
||||
|
||||
default[:pacemaker][:crm][:initial_config_file] = "/etc/corosync/crm-initial.conf"
|
||||
|
||||
# Only use short hostname (not FQDN)
|
||||
default['pacemaker']['nodes'] = ['node1', 'node2']
|
||||
|
||||
|
@ -18,6 +18,19 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
crm_conf = node[:pacemaker][:crm][:initial_config_file]
|
||||
template crm_conf do
|
||||
source "crm-initial.conf.erb"
|
||||
owner "root"
|
||||
group "root"
|
||||
mode 0600
|
||||
end
|
||||
|
||||
execute "crm initial configuration" do
|
||||
user "root"
|
||||
command "crm configure load replace #{crm_conf}"
|
||||
end
|
||||
|
||||
node[:pacemaker][:platform][:packages].each do |pkg|
|
||||
package pkg do
|
||||
action :install
|
||||
|
10
templates/default/crm-initial.conf.erb
Normal file
10
templates/default/crm-initial.conf.erb
Normal file
@ -0,0 +1,10 @@
|
||||
property $id="cib-bootstrap-options" \
|
||||
stonith-enabled="false" \
|
||||
no-quorum-policy="ignore" \
|
||||
placement-strategy="balanced"
|
||||
op_defaults $id="op-options" \
|
||||
timeout="600" \
|
||||
record-pending="true"
|
||||
rsc_defaults $id="rsc-options" \
|
||||
resource-stickiness="1" \
|
||||
migration-threshold="3"
|
Loading…
x
Reference in New Issue
Block a user