The Ansible code above was failing today as the latest version of Docker also installs two new packages (containerd.io
and docker-ce-cli
) and apt-show-versions -b -u
wasn’t listing these, so I have switched to using this command to see what is available to be upgraded and also show new packages:
- name: Check for updates and new packages using apt-get dist-upgrade -q -s
shell: apt-get dist-upgrade -q -s | grep '^The following' -A1 | grep '^ ' | xargs
args:
warn: False
executable: /bin/bash
register: packages
And I have moved this code from a private repo to a public Ansible role:
@stephen hope you can come to the Ansible session at the CoTech hack — the use of Ansible Galaxy to make roles public and shareable is one of the mains thing we want to discuss.
I’m now about to use this role to upgrade the server running this Discourse site so it is going to go down for a few minutes…