Puppet Function: dropbox_file

Defined in:
lib/puppet/parser/functions/dropbox_file.rb
Function type:
Ruby 3.x API

Overview

dropbox_file()Any

Returns:

  • (Any)


1
2
3
4
5
# File 'lib/puppet/parser/functions/dropbox_file.rb', line 1

Puppet::Parser::Functions::newfunction(:dropbox_file, :type => :rvalue) do |args|
  raise(Puppet::ParseError, 'Provide a single path') if args.size != 1
  path = lookupvar('dropbox::dropbox_root') + '/' + args.first
  File.read(path)
end