aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: ccbdebb89485e5f3365f5792c4993bac349255f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Manage a single global environment variables.
#
# @param key
#   Environment variable to set.
# @param value
#   Value of the set environment variable.
# @param order
#   Relative order to all other environment variables.
define envvar (
  String $value,
  String $key = $name,
  Integer[1, 999] $order = 100,
) {
  include envvar::setup

  concat::fragment { "/etc/environment - ${name}":
    target  => '/etc/environment',
    content => "${key}=${value}\n",
    order   => $order,
  }
}