This module manages pacemaker on Linux distros with the pcs tool.
Apache 2.0
Please log tickets and issues at https://github.com/radez/puppet-pacemaker
This module uses the fact osfamily which is supported by Facter 1.6.1+. If you do not have facter 1.6.1 in your environment, the following manifests will provide the same functionality in site.pp (before declaring any node):
if ! $::osfamily {
case $::operatingsystem {
'RedHat', 'Fedora', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL': {
$osfamily = 'RedHat'
}
'ubuntu', 'debian': {
$osfamily = 'Debian'
}
'SLES', 'SLED', 'OpenSuSE', 'SuSE': {
$osfamily = 'Suse'
}
'Solaris', 'Nexenta': {
$osfamily = 'Solaris'
}
default: {
$osfamily = $::operatingsystem
}
}
}
This module is based on work by Dan Radez
Installs Pacemaker and corosync and creates a cluster
class {"pacemaker::corosync":
cluster_name => "cluster_name",
cluster_members => "192.168.122.3 192.168.122.7",
}
The pacemaker::corosync resource must be executed on each node
class {"pacemaker::stonith":
disable => true,
}
class {"pacemaker::stonith::ipmilan":
address => "10.10.10.100",
user => "admin",
password => "admin",
}
Any of the following resources support a group propery. This will create the group, if the group doesn't exist, and add the resource to the group. This has been demonstrated on the ip address example, but is not a required propery.
pacemaker::resource::ip { "192.168.122.223":
ip_address => "192.168.122.223",
group => "my_group",
}
pacemaker::resource::lsb { "http":
require => Pacemaker::Resource::Ip['192.168.122.223'],
}
pacemaker::resource::mysql { "da-database": }
pacemaker::resource::filesystem { "apache share":
device => "192.168.122.1:/var/www/html",
directory => "/mnt",
fstype => "nfs",
}