From 58cf8d9dcbef783e280782d56febf06822e3e4eb Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 11 Jun 2010 09:47:57 -0700 Subject: Working #3139 - Catalogs default to host_config The whole host_config concept is a bit outdated now that Configurer exists, I think, (since any catalog it uses should be a host_config). However, fixing that is outside of the scope of this series. In the meantime, this does a better job of making sure every catalog except the Settings catalogs are host_configs. Signed-off-by: Luke Kanies --- lib/puppet/application/apply.rb | 2 -- lib/puppet/configurer.rb | 1 - lib/puppet/resource/catalog.rb | 4 +++- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index 39bcd268c..19346da59 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -116,8 +116,6 @@ class Puppet::Application::Apply < Puppet::Application # Translate it to a RAL catalog catalog = catalog.to_ral - catalog.host_config = true if Puppet[:graph] or Puppet[:report] - catalog.finalize catalog.retrieval_duration = Time.now - starttime diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb index f54611773..9e1fa0929 100644 --- a/lib/puppet/configurer.rb +++ b/lib/puppet/configurer.rb @@ -122,7 +122,6 @@ class Puppet::Configurer catalog = result.to_ral catalog.finalize catalog.retrieval_duration = duration - catalog.host_config = true catalog.write_class_file return catalog end diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb index b00b6f498..3cd4d7a8e 100644 --- a/lib/puppet/resource/catalog.rb +++ b/lib/puppet/resource/catalog.rb @@ -273,7 +273,7 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph end def host_config? - host_config || false + host_config end def initialize(name = nil) @@ -285,6 +285,8 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph @applying = false @relationship_graph = nil + @host_config = true + @aliases = {} if block_given? -- cgit