robertdebock.update

Ansible Role Update

This role helps you install updates on your system.

GitHub GitLab Downloads Version
github gitlab downloads Version

Example Playbook

Here's a simple example that uses this role. It's tested every time there's a change.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: robertdebock.update

Before running updates, your system needs to be prepared. This is done in CI like this:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: robertdebock.bootstrap

You can find a full guide here.

Role Variables

Default settings for the variables can be found in the defaults/main.yml file:

---
# defaults file for update

# For APT (Debian/Ubuntu): remove unused packages except `build-dep`
update_autoremove: false

# For APT (Debian/Ubuntu): type of upgrade, can be: dist, full, yes, or safe
update_upgrade_command: dist

# For APT (Debian/Ubuntu): refresh cache if older than this time (in seconds)
update_cache_valid_time: 1

# Choose whether to reboot after updates:
# "yes": Always reboot after updates.
# "no": Never reboot after updates.
update_reboot: true

# Exclude certain packages from updates. Works for:
# - apt
# - dnf
# - yum
#
# Example:
# update_excluded_packages:
#   - kernel
update_excluded_packages: []

Requirements

State of Used Roles

These roles prepare the system. You can choose another method if you prefer.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab

Context

This role works with many other compatible roles. Check out the documentation for those roles for more details.

Here's a chart showing the related roles: dependencies

Compatibility

This role has been tested on the following container images:

Container Tags
Alpine all
Amazon Candidate
EL 9
Debian all
Fedora all
Ubuntu all

You need at least Ansible version 2.12. Tests have also been done on:

  • Previous versions.
  • Current versions.
  • Development versions.

If you encounter any issues, please report them on GitHub.

License

This role is licensed under Apache-2.0.

Author Information

This role is created by robertdebock.

Feel free to consider sponsoring me.

Informazioni sul progetto

Install updates on your system.

Installa
ansible-galaxy install robertdebock.update
Licenza
apache-2.0
Download
174.9k
Proprietario
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.