ansible-roles/apt
David Prevot fef86b0a3f
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2631|4|2627|4|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/364//ansiblelint">Evolix » ansible-roles » unstable #364</a>
gitea/ansible-roles/pipeline/head This commit looks good
apt: Add Signed-by on Bookworm updates
The generic keyring is used instead of the specific ones for system and
security because /usr/share/keyrings/debian-archive-bookworm-* are not
present (yet) on major upgrades. It’s not ideal, and should be replaced
afterwards.

https://wiki.evolix.org/HowtoDebian/SourcesList#bookworm-12
2023-09-29 16:09:14 +02:00
..
defaults apt: with Debian, 12 backports are installed but disabled by default 2023-03-18 15:38:05 +01:00
files deb822-migration: Don’t keep evolix_public_old.sources on upgrade 2023-09-28 15:59:16 +02:00
meta Update Galaxy metadata (company, platforms and galaxy_tags) 2021-06-28 15:26:28 +02:00
tasks apt: Add Signed-by on Bookworm updates 2023-09-29 16:09:14 +02:00
templates apt: Explicit "signed-by" directives for official sources 2023-08-18 16:28:03 +02:00
tests Rename role "apt-repositories" to "apt" 2017-07-19 08:56:46 +02:00
.kitchen.yml Rename role "apt-repositories" to "apt" 2017-07-19 08:56:46 +02:00
README.md apt: add a script to manage packages with "hold" mark 2019-05-13 17:48:55 +02:00

apt

A few APT related operations, like easily install backports of change components for repositories.

Tasks

Tasks are extracted in several files, included in tasks/main.yml :

  • backports.yml : add a sources list for backports ;
  • basics_components.yml : replace components for the basic sources ;
  • hold_packages.yml : install script to automatically hold packages.

Available variables

  • apt_config : customize apt configuration (default: True) ;
  • apt_install_basics : change basic sources components (default: True) ;
  • apt_basics_components : basic sources components (default: main) ;
  • apt_install_backports : install backports sources (default: False) ;
  • apt_backports_components : backports sources (default: main) ;
  • apt_install_evolix_public : install Evolix public repositories (default: True) ;
  • apt_install_hold_packages : install script to automatically hold packages (default: True).
  • apt_hold_packages: list of packages that must have a "hold" mark (default: [])
  • apt_unhold_packages: list of packages that must not have a "hold" mark (default: [])

Examples

To add "non-free" and "contrib" components to basic sources lists :

{ role: apt,
    apt_install_basics: True,
    apt_basics_components: "main non-free contrib"
}

To install backports sources lists :

{ role: apt,
    apt_install_backports: True
}

To install backports sources lists with "non-free" and "contrib" :

{ role: apt,
    apt_install_backports: True,
    apt_backports_components: "main non-free contrib"
}

To install backports sources lists and have "non-free" and "contrib" for each repository :

{ role: apt,
    apt_install_basics: True,
    apt_basics_components: "main non-free contrib",
    apt_install_backports: True,
    apt_backports_components: "main non-free contrib"
}