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

Dpkg package selection selections

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

Authors: Brian Brazil (@brian-brazil) <brian.brazil@boxever.com>

Install Ansible via pip

Install with pip install ansible-core==2.16.5

Description

Change dpkg package selection state via --get-selections and --set-selections.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Prevent python from being upgraded
  ansible.builtin.dpkg_selections:
    name: python
    selection: hold
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Allow python to be upgraded
  ansible.builtin.dpkg_selections:
    name: python
    selection: install

Inputs

    
name:
    description:
    - Name of the package.
    required: true
    type: str

selection:
    choices:
    - install
    - hold
    - deinstall
    - purge
    description:
    - The selection state to set the package to.
    required: true
    type: str