I am wondering if I could make a feature request for juniper.device.software ansible module. On some of the MX series of routers there are 2 SSD disks, each with a Primary (p) partition and a Backup (b) partition.
JTAC recommends that when you perform a software upgrade on such a device, that you actually install 2 times, each time performing "request vmhost snapshot" after the upgrade. This ensures that the new version of code is on both the p,b partion of both disks, so that in the case you are required to boot from the backup SSD drive, you do not accidentally boot into an older version of code on one of the partitions.
juniper.device.software will just bail if the requested upgrade version == the version running on the device. I would like to propose that some "forcing" argument be added, such as "same_version_force" or what have you, so that when you need to do the second upgrade in this procedure you can force the upgrade of the same version of code.
The current workaround is to use juniper.device.command and send the proper "request vmhost software add <path_to_image> no-validate reboot".
Thank you for your consideration.