diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-06-06 15:59:01 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-06-06 15:59:01 -0700 |
| commit | 3d09ca82e57d0c8836b77623d876cd5dc9a3a5e6 (patch) | |
| tree | 8a55f2319be5042200b66e6c547f02ad52ac3c0f /lib/puppet/application | |
| parent | 8ebec1effc8038b1f59537450f3fe27249d543ee (diff) | |
| parent | 1c70f0ce54022b55119b9e2d6d60cd1ae9bc019e (diff) | |
Merge branch 'ticket/2.6.x/2128' into 2.6.x
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/apply.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/puppet/application/apply.rb b/lib/puppet/application/apply.rb index 7f0b95a89..717935640 100644 --- a/lib/puppet/application/apply.rb +++ b/lib/puppet/application/apply.rb @@ -85,13 +85,18 @@ 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 + + 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.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. |
