lib/poolparty/base_packages/heartbeat.rb in auser-poolparty-0.2.16 vs lib/poolparty/base_packages/heartbeat.rb in auser-poolparty-0.2.20

- old
+ new

@@ -4,31 +4,31 @@ def enable execute_if("$hostname", "master") do has_package(:name => "heartbeat-2", :ensure => "installed") do # These can also be passed in via hash + has_service(:name => "heartbeat", :hasstatus => true) + has_remotefile(:name => "/etc/ha.d/ha.cf") do mode 444 - notify 'Service["heartbeat"]' + notify service(:name => "heartbeat") template File.join(File.dirname(__FILE__), "..", "templates/ha.cf") end + + has_exec(:name => "heartbeat-update-cib", :command => "/usr/sbin/cibadmin -R -x /etc/ha.d/cib.xml", :refreshonly => true) has_remotefile(:name => "/etc/ha.d/authkeys") do mode 400 - notify 'Service["heartbeat"]' + notify service(:name => "heartbeat") template File.join(File.dirname(__FILE__), "..", "templates/authkeys") end has_remotefile(:name => "/etc/ha.d/cib.xml") do mode 444 - notify 'Exec["heartbeat-update-cib"]' + notify exec(:name => "heartbeat-update-cib") template File.join(File.dirname(__FILE__), "..", "templates/cib.xml") - end - - has_service(:name => "heartbeat", :hasstatus => true) - end - - has_exec(:name => "heartbeat-update-cib", :command => "/usr/sbin/cibadmin -R -x /etc/ha.d/cib.xml", :refreshonly => true) + end + end if @parent.provisioning? variable(:name => "ha_nodenames", :value => "#{list_of_running_instances.map{|a| "#{a.send :name}" }.join("\t")}") variable(:name => "ha_node_ips", :value => "#{list_of_running_instances.map{|a| "#{a.send :ip}" }.join("\t")}") else \ No newline at end of file