Created
July 5, 2013 18:47
-
-
Save matthew-cox/5936465 to your computer and use it in GitHub Desktop.
corosync + pacemaker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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