Is Ubuntu 18.04 still using the SSD drive for swap?

In an Ubuntu 18.04 two disk setup (/ on SSD, /home on spinning drive), my Ubuntu 18.04 has still defaulted to use swap space on the SSD although there was a swap partition of the same size on the spinning drive. This was not a new install, but a system upgrade from 16.04 (where I had created a swap partition manually on the spinning drive to spare the SSD). Linux is able to determine whether a drive is spinning or not, but apparently the installation/upgrade script was not very smart.

What swap partitions are available?

sudo fdisk -l
[...]
Disk /dev/sda: 74,5 GiB, 80026361856 bytes, 156301488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x34836041
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 148054782 148052735 70,6G 83 Linux
/dev/sda2 148056062 156301311 8245250 4G 5 Extended
/dev/sda5 148056064 156301311 8245248 4G 82 Linux swap / Solaris
Disk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf6870277
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 8390655 8388608 4G 82 Linux swap / Solaris
/dev/sdb2 8390656 1953525167 1945134512 927,5G 83 Linux
[...]

Checking which drive is the SSD:

cat /sys/block/sda/queue/rotational
0
cat /sys/block/sdb/queue/rotational
1

Which swap partition is used?

more /etc/fstab
[...]
# swap was on /dev/sda5 during installation
UUID=fdb5ad84-f758-4326-a6c8-7adf91d21079 none swap sw 0 0
[...]

Check whether the UUID corresponds to the SSD:

sudo blkid /dev/sda5
/dev/sda5: UUID="fdb5ad84-f758-4326-a6c8-7adf91d21079" TYPE="swap" PARTUUID="34836041-05"