{"id":73,"date":"2024-04-24T08:51:52","date_gmt":"2024-04-24T08:51:52","guid":{"rendered":"https:\/\/www.rajeshkumar.xyz\/blog\/?p=73"},"modified":"2024-04-24T08:51:52","modified_gmt":"2024-04-24T08:51:52","slug":"ansible-playbook-retrieves-a-list-of-installed-packages-along-with-their-versions-before-after-upgrading","status":"publish","type":"post","link":"https:\/\/www.rajeshkumar.xyz\/blog\/ansible-playbook-retrieves-a-list-of-installed-packages-along-with-their-versions-before-after-upgrading\/","title":{"rendered":"Ansible Playbook: Retrieves a list of installed packages along with their versions before &amp; After upgrading"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><br>Below is an Ansible playbook script that performs the following actions sequentially:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Retrieves a list of installed packages along with their versions before upgrading.<\/li>\n\n\n\n<li>Upgrades the operating system packages.<\/li>\n\n\n\n<li>Retrieves a list of installed packages along with their versions after the upgrade to compare which packages were upgraded.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">This playbook assumes the target systems are using a Debian-based distribution like Ubuntu, as it utilizes the <code>apt<\/code> module for package management. Adjustments might be needed for other distributions.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/rajeshkumarin\/5602575b4bdf01c8af290aaad453e1bf.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>Below is an Ansible playbook script that performs the following actions sequentially: This playbook assumes the target systems are using&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"series":[],"class_list":["post-73","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":1,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":74,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/73\/revisions\/74"}],"wp:attachment":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/tags?post=73"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/series?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}