Created
February 4, 2013 21:03
-
-
Save jrmoserbaltimore/4709697 to your computer and use it in GitHub Desktop.
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 pacemaker::config::crm { | |
$crm_config = $pacemaker::crm_config | |
$crm_hash = $pacemaker::crm_hash | |
exec { 'dump crm config': | |
command => 'crm configure save /etc/corosync/config.crm', | |
onlyif => 'rm -f /etc/corosync/config.crm', | |
path => '/bin:/sbin:/usr/bin:/usr/sbin', | |
tag => 'pre-crm', | |
} | |
file { '/etc/corosync/config.crm': | |
content => template($crm_config), | |
owner => 'root', | |
group => 'root', | |
mode => '0644', | |
tag => 'crm', | |
} | |
exec { 'load crm config': | |
command => 'crm configure load replace /etc/corosync/config.crm', | |
onlyif => 'crm configure property stop-all-resources=true', | |
path => '/bin:/sbin:/usr/bin:/usr/sbin', | |
refreshonly => true, | |
tag => 'post-crm', | |
} | |
Package <| tag == 'pacemaker' |> -> | |
Exec <| tag == 'prepare-crm' |> -> | |
Exec <| tag == 'pre-crm' |> -> | |
File <| tag == 'crm' |> ~> | |
Exec <| tag == 'post-crm' |> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment