diff options
Diffstat (limited to 'lib/puppet/network/handler/master.rb')
| -rw-r--r-- | lib/puppet/network/handler/master.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index ace383e9f..18f37ca4a 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -77,7 +77,9 @@ class Puppet::Network::Handler fact_handler.set(client, facts) # And get the configuration from the config handler - return config_handler.configuration(client) + config = config_handler.configuration(client) + + return translate(config.extract) end def local=(val) @@ -139,5 +141,14 @@ class Puppet::Network::Handler end @fact_handler end + + # Translate our configuration appropriately for sending back to a client. + def translate(config) + if local? + config + else + CGI.escape(config.to_yaml(:UseBlock => true)) + end + end end end |
