Defined Type: debconf::set

Defined in:
modules/debconf/manifests/set.pp

Overview

SPDX-License-Identifier: Apache-2.0

Define: debconf::set

Sets a debconf value, useful for preseeding package configuration before installing them.

Parameters

title

debconf question, e.g. mailman/used_languages

value

preseeded answer to the debconf question

type

type of the value to set. Default: string

owner

'Owner' of the debconf setting, this should usually be the package name. For historical reasons, this is 'set', as this was incorrectly used as the 'owner' for all usages of this define. In order to not break those existent usages, this value defaults to 'set'. If you are using this define for a new setting, please set $owner to the package name the setting is for.

Parameters:

  • value (Any)
  • type (Any) (defaults to: 'string')
  • owner (Any) (defaults to: 'set')


26
27
28
29
30
31
32
33
34
35
36
# File 'modules/debconf/manifests/set.pp', line 26

define debconf::set(
    $value,
    $type = 'string',
    $owner = 'set'
) {
    exec { "debconf-set-selections ${owner} ${type} ${title}":
        path    => '/usr/bin:/usr/sbin:/bin:/sbin',
        command => "echo ${owner} ${title} ${type} \"${value}\" | debconf-set-selections",
        unless  => "test \"$(echo get ${title} | debconf-communicate)\" = \"0 ${value}\"",
    }
}