Puppet Function: dynatrace_file_exists
- Defined in:
- lib/puppet/parser/functions/dynatrace_functions.rb
- Function type:
- Ruby 3.x API
Overview
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/puppet/parser/functions/dynatrace_functions.rb', line 111 newfunction(:dynatrace_file_exists, :type => :rvalue) do |args| file_to_check = '/opt/dynatrace' if File.exists?(file_to_check) || File.symlink?(file_to_check) puts "File #{file_to_check} exists." return 1 else puts "File #{file_to_check} do not exists." return 0 end end |