Forge Home

debconf

Manage debconf database items on Debian based systems.

1,161,495 downloads

4,035 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 6.0.0 (latest)
  • 5.0.0
  • 4.1.0
  • 4.0.0
  • 3.3.1
  • 3.3.0
  • 3.2.0
  • 3.1.0 (deleted)
  • 3.0.0
  • 2.3.0
  • 2.2.1
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.0.1
  • 1.0.0
released Jul 7th 2023
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'stm-debconf', '6.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add stm-debconf
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install stm-debconf --version 6.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: debconf

Documentation

stm/debconf — version 6.0.0 Jul 7th 2023

debconf

Build Status Puppet Forge License

Table of Contents

  1. Overview
  2. Module Description - What does the module do?
  3. Setup - The basics of getting started with debconf
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

Manage entries in the Debian debconf database.

Module Description

Debian based systems use the debconf database to record configuration choices the user made during the installation of a package. The system uses the stored answers and therefore does not need to query the user again when the package is upgraded or reinstalled at a later time.

The debconf type allows preseeding the database with given answers to allow an unattended package installation or modification of package defaults. The type can optionally also manage the seen flag for an item.

The standard package type uses the responsefile parameter to provide a file with preseeded answers during installation. The debconf type is a more general solution as it allows to update settings without the need to install the package at the same time.

Setup

What debconf affects

The debconf type modifies entries in the Debian debconf database.

Setup Requirements

This module uses programs provided by the Debian/Ubuntu debconf package. Debian assigns the required priority to this package so it should already be installed everywhere.

Usage

Use debconf-show or debconf-get-selections to find out about valid debconf entries for an installed package.

Example: Use dash as replacement for the bourne shell

This entry will ensure a symlink from /bin/sh to /bin/dash if dpkg-reconfigure dash is run the next time. It will also mark the question as seen to prevent the installer from asking this question during the installation.

debconf { 'dash/sh':
  type  => 'boolean',
  value => 'true',
  seen  => true,
}

Note: Although this code is perfectly legal Puppet code, the string 'true' (not the boolean true) will trigger the puppet-lint warning quoted_booleans. But we really want to use the string 'true' and not the boolean truth value here. So in this case we can easily suppress the warning with a control comment:

debconf { 'dash/sh':
  type  => 'boolean',
  value => 'true',      # lint:ignore:quoted_booleans
  seen  => true,
}

Example: Automatically set a root password for MySQL during installation

These two resources preseed the installation of the mysql-server-5.5 package with the password for the MySQL root user to use. The password has to be set twice because the installation dialog asks two times for the password to detect typos. This password is used if the package is installed after these resources have been created.

debconf { 'mysql-root-passwd':
  package => 'mysql-server-5.5',
  item    => 'mysql-server/root_password',
  type    => 'password',
  value   => 'secret',
  seen    => true,
}

debconf { 'mysql-root-passwd-again':
  package => 'mysql-server-5.5',
  item    => 'mysql-server/root_password_again',
  type    => 'password',
  value   => 'secret',
  seen    => true,
}

Reference

See REFERENCE.md

This module is only useful on Debian based systems where the debconf database is used.

A control comment may be needed to suppress puppet-lint warnings when you set boolean values. See the Usage section for an example.

The value of the type parameter is only used when an item is created. It is not updated if the value of the item is changed later.

Development

Feel free to send pull requests for new features.