acceptance/lib/puppet/acceptance/temp_file_utils.rb
# Create a file on the host.
# Parameters:
# [host] the host to create the file on
# [file_path] the path to the file to be created
# [file_content] a string containing the contents to be written to the file
# [options] a hash containing additional behavior options.  Currently supported:
# * :mkdirs (default false) if true, attempt to create the parent directories on the remote host before writing
#       the file
# * :owner (default 'root') the username of the user that the file should be owned by
# * :group (default 'puppet') the name of the group that the file should be owned by
# * :mode (default '644') the mode (file permissions) that the file should be created with
Create a file on the host.
Parameters:
[host] the host to create the file on
[file_path] the path to the file to be created
[file_content] a string containing the contents to be written to the file
[options] a hash containing additional behavior options.
Create a file on the host . Parameters : [ host ] the host to create the file on [ file_path ] the path to the file to be created [ file_content ] a string containing the contents to be written to the file [ options ] a hash containing additional behavior options .
def file_contents(host, file_path)
        host.execute("cat \"#{file_path}\"") do |result|
          return result.stdout
        end
      end
def file_contents ( host , file_path ) host . execute ( "cat \"#{file_path}\"" ) do | result | return result . stdout end end
Create a file on the host.
Create a file on the host .
host
<not_specific>
file_path
<not_specific>