# File lib/simp/cli/config/items/data/cli_simp_scenario.rb, line 27 def os_value site_pp = File.join(::Utils.puppet_info[:simp_environment_path], 'manifests', 'site.pp') # If SIMP has not be copied over to the Puppet environments yet, (RPM install # not ISO or R10K install), this file won't be present return nil unless File.exist?(site_pp) scenario_lines = IO.readlines(site_pp).delete_if do |line| !(line =~ /^\$simp_scenario\s*=\s*['"]*(\S+)['"]/) end return nil if scenario_lines.size != 1 scenario_lines[0].match(/^\$simp_scenario\s*=\s*['"]*(\S+)['"]/)[1] end