ednz_cloud.manage_apt_packages
manage_apt_packages
This is just a copy of the repository. Development and testing happen on a private Gitea server.
This role lets you manage packages on debian-based systems. You can use it alone or call it from other roles that need to install or remove packages.
Requirements
No specific requirements.
Role Variables
Here are the available variables and their default values. If you need a sample for the default values, check default/manage_apt_packages.yml.sample
for your group_vars
or host_vars
.
manage_apt_packages_list: # by default, not defined
- name: nginx
version: latest # If left empty or set to '', it will use the latest version
state: absent
- name: ...
This variable is a list of packages, including their name, desired version, and state. The role supports rolling back versions, so it's usually best to keep the version as latest
or empty.
Dependencies
None.
Example Playbook
# Using the role in a playbook with default or group_vars/host_vars
- hosts: servers
roles:
- ednz_cloud.manage_apt_packages
# Using the role in a playbook with custom variables (such as in another role)
- hosts: servers
tasks:
- name: "Install consul package"
ansible.builtin.include_role:
name: ednz_cloud.manage_apt_packages
vars:
manage_apt_packages_list:
- name: consul
version: 1.13.1-1
state: present
License
MIT / BSD
Author Information
This role was created by Bertrand Lanson in 2023.
Installa
ansible-galaxy install ednz_cloud.manage_apt_packages
Licenza
mit
Download
2.5k
Proprietario
Automate all the things.