Below is an Ansible playbook script that performs the following actions sequentially:
- Retrieves a list of installed packages along with their versions before upgrading.
- Upgrades the operating system packages.
- Retrieves a list of installed packages along with their versions after the upgrade to compare which packages were upgraded.
This playbook assumes the target systems are using a Debian-based distribution like Ubuntu, as it utilizes the apt
module for package management. Adjustments might be needed for other distributions.
Leave a Reply