Sha256: afb636686442d71995dcb50ce980e03743064baa3b3bf800505fe134fd926df3

Contents?: true

Size: 357 Bytes

Versions: 7

Compression:

Stored size: 357 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]
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bolt-1.21.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.20.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.19.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.18.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.17.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.16.0 bolt-modules/system/lib/puppet/functions/system/env.rb
bolt-1.15.0 bolt-modules/system/lib/puppet/functions/system/env.rb