Displaying 1 result from an estimated 1 matches for "cib_epoch".
2008 Oct 14
2
Fact load failure
Hi,
I''ve created this fact:
require ''facter''
if FileTest.exists?("/etc/ha.d")
if `service heartbeat status` =~ /running/
cib = `cibadmin -Q`.grep(/epoch/).to_s
epoch = cib.scan(/[0-9]+/).first
Facter.add("cib_epoch") do
setcode do
epoch.to_i + 1
end
end
end
end
end
I''ve tested it as directed in the wiki:
# facter cib_epoch
1
I''ve put it in /etc/puppet/facts, and run puppet on a cluster node.
I get:
# puppetd --test --debug
info: Loading fact ci...