2b74b5299e
Updated "astute_settings_yaml" and "fuel_version_yaml" facts to support search for info in several files. This is needed for Fuel containers. Both facts look for their files in /etc/fuel/ dir first, then in default locations. Infortmation is takes from the first file it finds. - astute_settings_yaml fact search path: * /etc/fuel/astute.yaml * /etc/astute.yaml - fuel_version_path fact search path: * /etc/fuel/version.yaml * /etc/fuel/nailgun/version.yaml * /etc/nailgun/version.yaml blueprint fuel-containerization-of-services Change-Id: Ie31dc02b88f1c7de419ac8b1a6ce3f1d149e7eae
15 lines
372 B
Ruby
15 lines
372 B
Ruby
require 'facter'
|
|
|
|
fuel_version_path = [ '/etc/fuel/version.yaml', '/etc/fuel/nailgun/version.yaml', '/etc/nailgun/version.yaml' ]
|
|
read_data = "none"
|
|
|
|
Facter.add('fuel_version_yaml') do
|
|
fuel_version_path.each do |fuel_version_file|
|
|
if File.exist?(fuel_version_file)
|
|
read_data = File.read(fuel_version_file)
|
|
break
|
|
end
|
|
end
|
|
setcode { read_data }
|
|
end
|