obvionaoe / ansible-role-apt

A simple Ansible role to handle installing, removing and upgrading packages with apt.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible Role: apt

A simple Ansible role to handle installing, removing and upgrading packages with apt.

Requirements

  • apt

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

apt_cache_valid_time: 3600

Update the apt cache if it is older than the set value. This option is set in seconds.

apt_packages_to_install: []
apt_packages_to_remove: []

Lists of packages to install (apt_packages_to_install) and to remove (apt_packages_to_remove).

apt_upgrade: false

Control if the role should upgrade all upgradeable packages.

apt_autoremove: false
apt_autoremove_purge: false

Control if the role should automatically remove all unneeded dependencies (apt_autoremove) and purge their configuration files (apt_autoremove_purge).

Dependencies

None.

Example Playbook

- hosts: servers
  roles:
    - role: obvionaoe.apt

License

MIT

Author Information

This role was created in 2024 by Luís Guimarães.

About

A simple Ansible role to handle installing, removing and upgrading packages with apt.

License:MIT License