summaryrefslogtreecommitdiffstats
path: root/lib/puppet/configurer/fact_handler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/configurer/fact_handler.rb')
-rw-r--r--lib/puppet/configurer/fact_handler.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/puppet/configurer/fact_handler.rb b/lib/puppet/configurer/fact_handler.rb
index cbb627680..40e79b6c6 100644
--- a/lib/puppet/configurer/fact_handler.rb
+++ b/lib/puppet/configurer/fact_handler.rb
@@ -27,12 +27,15 @@ module Puppet::Configurer::FactHandler
facts = find_facts
#format = facts.class.default_format
- # Hard-code yaml, because I couldn't get marshal to work.
- format = :b64_zlib_yaml
+ if facts.support_format?(:b64_zlib_yaml)
+ format = :b64_zlib_yaml
+ else
+ format = :yaml
+ end
text = facts.render(format)
- return {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(text)}
+ return {:facts_format => format, :facts => CGI.escape(text)}
end
# Retrieve facts from the central server.