Sha256: fd4e062357690b529bb6edcb984455840d961064efa12d5bab12f8ac409155e4

Contents?: true

Size: 364 Bytes

Versions: 8

Compression:

Stored size: 364 Bytes

Contents

# frozen_string_literal: true

# Get an environment variable.
Puppet::Functions.create_function(:'system::env') do
  # @param name Environment variable name.
  # @example Get the USER environment variable
  #   system::env('USER')
  dispatch :env do
    required_param 'String', :name
    return_type 'String'
  end

  def env(name)
    ENV[name].freeze
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bolt-1.14.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.13.1 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.13.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.12.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.11.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.10.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.9.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.8.1 bolt-modules/system/lib/puppet/functions/system/env.rb