Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ednz-cloud/manage_apt_packages
Ansible role to install and manage packages with APT on debian-based systems. Mirror from https://git.ednz.fr/ansible-roles/manage_apt_packages.
https://github.com/ednz-cloud/manage_apt_packages
ansible ansible-role apt linux
Last synced: 5 days ago
JSON representation
Ansible role to install and manage packages with APT on debian-based systems. Mirror from https://git.ednz.fr/ansible-roles/manage_apt_packages.
- Host: GitHub
- URL: https://github.com/ednz-cloud/manage_apt_packages
- Owner: ednz-cloud
- License: mit
- Created: 2023-03-10T19:33:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-05T21:23:57.000Z (11 months ago)
- Last Synced: 2024-11-07T18:41:42.843Z (about 2 months ago)
- Topics: ansible, ansible-role, apt, linux
- Homepage: https://ednz.fr
- Size: 36.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
manage_apt_packages
=========
> This repository is only a mirror. Development and testing is done on a private gitea server.This role enables you to manage packages on **debian-based** distributions. It can be used on its own , or be called by other roles the install/remove packages on demand.
Requirements
------------None.
Role Variables
--------------
Available variables are listed below, along with default values. A sample file for the default values is available in `default/manage_apt_packages.yml.sample` in case you need it for any `group_vars` or `host_vars` configuration.```yaml
manage_apt_packages_list: # by default, not defined
- name: nginx
version: latest # Leaving empty or setting '' will be considered as latest
state: absent
- name: ...
```
This variable is a list of packages, with their name, desired version and state. Note that the role allows version rollbacks, so unless you absolutely need a specific version, it is usualy advised to keep the version on `latest` or empty (which is considered the same).Dependencies
------------None.
Example Playbook
----------------```yaml
# calling the role inside a playbook with either the default or group_vars/host_vars
- hosts: servers
roles:
- ednz_cloud.manage_apt_packages
``````yaml
# calling the role inside a playbook and injecting variables (in another role for example)
- 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.