Skip to content

r0mdau/ansible-role-package-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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¹

Releases

No releases published

Packages

No packages published