summaryrefslogtreecommitdiffstats
path: root/lib/puppet/application
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/application')
-rw-r--r--lib/puppet/application/agent.rb2
-rw-r--r--lib/puppet/application/apply.rb13
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb
index 06a158fb3..f0442648b 100644
--- a/lib/puppet/application/agent.rb
+++ b/lib/puppet/application/agent.rb
@@ -320,7 +320,7 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
unless fingerprint = cert.fingerprint(options[:digest])
raise ArgumentError, "Could not get fingerprint for digest '#{options[:digest]}'"
end
- Puppet.notice fingerprint
+ puts fingerprint
end
def onetime
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb
index 5779e799c..3ba06d34a 100644
--- a/lib/puppet/application/apply.rb
+++ b/lib/puppet/application/apply.rb
@@ -168,13 +168,18 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
end
# Collect our facts.
- unless facts = Puppet::Node::Facts.indirection.find(Puppet[:certname])
- raise "Could not find facts for #{Puppet[:certname]}"
+ unless facts = Puppet::Node::Facts.indirection.find(Puppet[:node_name_value])
+ raise "Could not find facts for #{Puppet[:node_name_value]}"
+ end
+
+ unless Puppet[:node_name_fact].empty?
+ Puppet[:node_name_value] = facts.values[Puppet[:node_name_fact]]
+ facts.name = Puppet[:node_name_value]
end
# Find our Node
- unless node = Puppet::Node.indirection.find(Puppet[:certname])
- raise "Could not find node #{Puppet[:certname]}"
+ unless node = Puppet::Node.indirection.find(Puppet[:node_name_value])
+ raise "Could not find node #{Puppet[:node_name_value]}"
end
# Merge in the facts.