ansible.builtin.debconf (v2.16.5) — module

Configure a .deb package

| "added in version" 1.6 of ansible.builtin"

Authors: Brian Coca (@bcoca)

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Configure a .deb package using debconf-set-selections.

Or just query existing selections.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set default locale to fr_FR.UTF-8
  ansible.builtin.debconf:
    name: locales
    question: locales/default_environment_locale
    value: fr_FR.UTF-8
    vtype: select
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set to generate locales
  ansible.builtin.debconf:
    name: locales
    question: locales/locales_to_be_generated
    value: en_US.UTF-8 UTF-8, fr_FR.UTF-8 UTF-8
    vtype: multiselect
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Accept oracle license
  ansible.builtin.debconf:
    name: oracle-java7-installer
    question: shared/accepted-oracle-license-v1-1
    value: 'true'
    vtype: select
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Specifying package you can register/return the list of questions and current values
  ansible.builtin.debconf:
    name: tzdata
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Pre-configure tripwire site passphrase
  ansible.builtin.debconf:
    name: tripwire
    question: tripwire/site-passphrase
    value: "{{ site_passphrase }}"
    vtype: password
  no_log: True

Inputs

    
name:
    aliases:
    - pkg
    description:
    - Name of package to configure.
    required: true
    type: str

value:
    aliases:
    - answer
    description:
    - Value to set the configuration to.
    type: str

vtype:
    choices:
    - boolean
    - error
    - multiselect
    - note
    - password
    - seen
    - select
    - string
    - text
    - title
    description:
    - The type of the value supplied.
    - It is highly recommended to add C(no_log=True) to task while specifying O(vtype=password).
    - V(seen) was added in Ansible 2.2.
    type: str

unseen:
    default: false
    description:
    - Do not set 'seen' flag when pre-seeding.
    type: bool

question:
    aliases:
    - selection
    - setting
    description:
    - A debconf configuration setting.
    type: str