system-config/modules/jenkins/lib/facter/memorytotalbytes.rb
Monty Taylor e35a6e7c73 Aggregate jenkins modules into one module.
Put jenkins_master into jenkins::master and jenkins_job_builder into
jenkins::job_builder and jenkins_slave into jenkins::slave.

Change-Id: Icb0e3071894730c17d8f36f49e9d34979d9c568e
Reviewed-on: https://review.openstack.org/11249
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
2012-08-12 18:22:26 +00:00

8 lines
170 B
Ruby
Executable File

# memorytotalbytes.rb
Facter.add("memorytotalbytes") do
setcode do
Facter::Util::Resolution.exec('free -bo | sed -n \'s/^Mem:\W\+\([0-9]\+\).*$/\1/p\'')
end
end