diff options
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/application/apply.rb | 8 | ||||
-rw-r--r-- | lib/puppet/configurer.rb | 4 | ||||
-rw-r--r-- | lib/puppet/configurer/fact_handler.rb | 2 | ||||
-rw-r--r-- | lib/puppet/defaults.rb | 1 | ||||
-rw-r--r-- | lib/puppet/transaction/report.rb | 2 |
5 files changed, 9 insertions, 8 deletions
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index 7f0b95a89..3f423a4c4 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -85,13 +85,13 @@ class Puppet::Application::Apply < Puppet::Application end # Collect our facts. - unless facts = Puppet::Node::Facts.find(Puppet[:certname]) - raise "Could not find facts for #{Puppet[:certname]}" + unless facts = Puppet::Node::Facts.find(Puppet[:node_name_value]) + raise "Could not find facts for #{Puppet[:node_name_value]}" end # Find our Node - unless node = Puppet::Node.find(Puppet[:certname]) - raise "Could not find node #{Puppet[:certname]}" + unless node = Puppet::Node.find(Puppet[:node_name_value]) + raise "Could not find node #{Puppet[:node_name_value]}" end # Merge in the facts. diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb index 9f68ca499..d0251de82 100644 --- a/lib/puppet/configurer.rb +++ b/lib/puppet/configurer.rb @@ -220,7 +220,7 @@ class Puppet::Configurer def retrieve_catalog_from_cache(fact_options) result = nil @duration = thinmark do - result = Puppet::Resource::Catalog.find(Puppet[:certname], fact_options.merge(:ignore_terminus => true)) + result = Puppet::Resource::Catalog.find(Puppet[:node_name_value], fact_options.merge(:ignore_terminus => true)) end Puppet.notice "Using cached catalog" result @@ -233,7 +233,7 @@ class Puppet::Configurer def retrieve_new_catalog(fact_options) result = nil @duration = thinmark do - result = Puppet::Resource::Catalog.find(Puppet[:certname], fact_options.merge(:ignore_cache => true)) + result = Puppet::Resource::Catalog.find(Puppet[:node_name_value], fact_options.merge(:ignore_cache => true)) end result rescue SystemExit,NoMemoryError diff --git a/lib/puppet/configurer/fact_handler.rb b/lib/puppet/configurer/fact_handler.rb index 075a59458..4d80e17b6 100644 --- a/lib/puppet/configurer/fact_handler.rb +++ b/lib/puppet/configurer/fact_handler.rb @@ -16,7 +16,7 @@ module Puppet::Configurer::FactHandler # compile them and then "cache" them on the server. begin reload_facter - Puppet::Node::Facts.find(Puppet[:certname]) + Puppet::Node::Facts.find(Puppet[:node_name_value]) rescue SystemExit,NoMemoryError raise rescue Exception => detail diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 2a1ded592..17c2850e5 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -486,6 +486,7 @@ module Puppet ) setdefaults(:agent, + :node_name_value => ["$certname", "The name of the node."], :localconfig => { :default => "$statedir/localconfig", :owner => "root", :mode => 0660, diff --git a/lib/puppet/transaction/report.rb b/lib/puppet/transaction/report.rb index 16fee42ae..841c56968 100644 --- a/lib/puppet/transaction/report.rb +++ b/lib/puppet/transaction/report.rb @@ -67,7 +67,7 @@ class Puppet::Transaction::Report @logs = [] @resource_statuses = {} @external_times ||= {} - @host = Puppet[:certname] + @host = Puppet[:node_name_value] @time = Time.now @kind = kind @report_format = 2 |