summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/client.rb10
-rw-r--r--lib/chef/mixin/command.rb2
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index fce634278a..24f2ec7555 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -43,6 +43,9 @@ class Chef
# * converge
#
# In that order.
+ #
+ # === Returns
+ # true:: Always returns true.
def run
build_node
register
@@ -50,10 +53,14 @@ class Chef
do_attribute_files
save_node
converge
+ true
end
# Builds a new node object for this client. Starts with querying for the FQDN of the current
- # host, then merges in the facts from Facter.
+ # host (unless it is supplied), then merges in the facts from Facter.
+ #
+ # === Parameters
+ # node_name<String>:: The name of the node to build - defaults to nil
def build_node(node_name=nil)
node_name ||= Facter["fqdn"].value ? Facter["fqdn"].value : Facter["hostname"].value
@safe_name = node_name.gsub(/\./, '_')
@@ -139,6 +146,7 @@ class Chef
end
cr = Chef::Runner.new(results["node"], results["collection"])
cr.converge
+ true
end
protected
diff --git a/lib/chef/mixin/command.rb b/lib/chef/mixin/command.rb
index df95346f90..85e3c466eb 100644
--- a/lib/chef/mixin/command.rb
+++ b/lib/chef/mixin/command.rb
@@ -100,7 +100,7 @@ class Chef
# This is taken directly from Ara T Howard's Open4 library, and then
# modified to suit the needs of Chef. Any bugs here are most likely
- # my own, and not Ara.
+ # my own, and not Ara's.
#
# The original appears in external/open4.rb in it's unmodified form.
#