# File lib/simp/cli/config/items/data/cli_is_simp_environment_installed.rb, line 21 def os_value # SIMP can be installed via an ISO, individual RPMs or R10K. When SIMP # is installed from an ISO or R10K, the SIMP modules are automatically # copied into the Puppet environments directory. When SIMP is # installed via individual RPMs, this copy is not done. We detect # the last case as follows: # - /etc/simp/adapter_config.yaml exists # - 'copy_rpm_data' key has a value of false if File.exist?(@adapter_config) begin yaml = YAML.load(File.read(@adapter_config)) if yaml.nil? or yaml == false return 'no' else return ( (yaml['copy_rpm_data'] == true) ? 'yes' : 'no' ) end rescue Psych::SyntaxError # something wrong with the YAML file, so we are # going to assume the copy did not happen return 'no' end else return 'yes' # must be a R10K installation, as no simp_adapter RPM end end