lib/capitate/plugins/utils.rb in capitate-0.3.1 vs lib/capitate/plugins/utils.rb in capitate-0.3.2

- old
+ new

@@ -108,9 +108,21 @@ end end found end + # Get the hostname of the remote server + # + # ==== Example + # utils.hostname => "localhost.localdomain" + # + def hostname + run "hostname" do |channel, stream, data| + return data.chomp + end + nil + end + # Append data to a file. # Optionally check that it exists before adding. # # ==== Options # +path+:: Path to file to append to \ No newline at end of file