Improve errata_upgrade task

Finish missing automation parts of errata_upgrade.

This is the follow up of the #103
Understood, so then worth adding an if/else block.