Skip to content

Instantly share code, notes, and snippets.

@matthew-cox
Created July 5, 2013 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthew-cox/5936465 to your computer and use it in GitHub Desktop.
Save matthew-cox/5936465 to your computer and use it in GitHub Desktop.
corosync + pacemaker
class {
'corosync':
bind_address => $theIP,
enable_secauth => false,
unicast_addresses => $ucastIPs,
;
}
# add pacemaker as a corosync service
corosync::service {
'pacemaker':
version => '0',
notify => Service['corosync'],
;
}
# do the remaining configuration in a template
file {
"/root/mnc-read-only" :
ensure => link,
target => "$repoDir/mnc-read-only",
;
"/etc/corosync/rk-cluster.config" :
content => template("${module_name}/pacemaker.conf.erb"),
ensure => file,
group => "root",
mode => 644,
notify => Exec["corosync-load-config"],
owner => "root",
require => Service["corosync"],
;
}
# try to force a configuration load
exec {
"corosync-load-config" :
command => "/usr/sbin/crm -F configure load replace /etc/corosync/rk-cluster.config",
refreshonly => true,
require => File["/etc/corosync/rk-cluster.config"],
;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment