![]() The yum output shows the status of the update while it is running. Use whichever works for you, this is just to show you the most common form. Installing packages outside of the Cumulus Linux repository requires the use of sudo -E apt-get however, depending on the package, you can use easy-install. ec2-user sudo yum update Review the packages listed, enter y, and press Enter to accept the updates.Updating all of the packages on a system can take several minutes. You use -u user and -K (ask for privilege escalation password). This is an example of typical privilege escalation through Ansible. To save that list to a text file called packages on your desktop do this. (The -v tag 'inverts' grep to return non-matching lines) To get a list of a specific package installed: dpkg -get-selections grep postgres. 346 3 3 silver badges 10 10 bronze badges. Note that I am using -become and become: true. To get a list of packages installed locally do this in your terminal: dpkg -get-selections grep -v deinstall. Update list of available packages from Kali repo sudo apt update Upgrade the WSL system sudo apt full-upgrade Share. To do this as an ad-hoc command you can run: $ ansible all -m apt -a "upgrade=yes update_cache=yes cache_valid_time=86400" -becomeĪd-hoc commands are described in detail here So it's good to include if you don't want to update the cache when it has only recently been updated. Update the apt cache if its older than the cache_valid_time. ![]() Note: If troubleshooting has led to Ubuntu needing to be reinstalled, please refer to our reinstallation guide How to Reinstall Ubuntu. sudo apt install -f APT lists the missing packages on your system. As user535733 mentioned in the comments there is a 3rd possibility to upgrade: sudo apt full-upgrade. Remember that you need to perform an apt update before the apt upgrade command so that apt knows that new versions of packages are available. The cache_valid_time value can be omitted. Use apt install with the -f flag to tell APT to locate the missing packages and install them. Then you might 'update and install' existing code by executing: sudo apt upgrade. In a playbook, you can update and upgrade like so: - name: Update and upgrade apt packages I wouldn't recommend using shell for this, as Ansible has the apt module designed for just this purpose.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |