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
None.
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.
None.
- 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
///TODO
ansible-playbook tests/test.yml -i tests/inventory --syntax-check
Apache-2.0
r0mdau¹