diff --git a/lib/puppet/functions/foreman/foreman.rb b/lib/puppet/functions/foreman/foreman.rb index ceec690ba..6ed9767fb 100644 --- a/lib/puppet/functions/foreman/foreman.rb +++ b/lib/puppet/functions/foreman/foreman.rb @@ -72,7 +72,7 @@ def foreman(item, search, per_page = "20", foreman_url = "https://localhost", fo configfile = '/etc/foreman-proxy/settings.yml' configfile = use_tfmproxy if use_tfmproxy.is_a? String raise Puppet::ParseError, "File #{configfile} not found while use_tfmproxy is enabled" unless File.exist?(configfile) - tfmproxy = YAML.load(File.read(configfile)) + tfmproxy = YAML.safe_load(File.read(configfile)) uri = URI.parse(tfmproxy[:foreman_url]) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true