Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.