package_update

Ansible Role: package-update

Role to update Debian, RHEL and CentOS packages.

Features :

  • update all packages except blacklisted
  • gracefully shutdown services
  • allow or not reboot if needed
  • remove unused dependencies

Requirements

None.

Role Variables

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

allow_reboot: true

Allow or not rebooting if updating needs reboot.

before_reboot_stop: []

List services to gracefully shutdown before reboot.

hold_packages: []

List packages to hold = packages to not upgrade.

remove_unused_dependencies: true

Choose to clean unused dependencies after upgrade.

Dependencies

None.

Example Playbook

- hosts: all
  become: yes
  roles:
    - {role: r0mdau.package_update }

Inside playbook group_vars/all.yml:

allow_reboot: false
before_reboot_stop:
  - nginx
hold_packages:
  - nginx

Scripts

///TODO

ansible-playbook tests/test.yml -i tests/inventory --syntax-check

License

Apache-2.0

Author Information

r0mdau¹

About

Update packages for Linux.

Install
ansible-galaxy install r0mdau/ansible-role-package-update
GitHub repository
License
apache-2.0
Downloads
22
Owner
Technical Lead, Site Reliability Engineering, I empower teams to be "Highly aligned, loosely coupled"