Problem upgrading mikrotiks RB3011/962

Hello,
I’ve got a lot of mikrotik RB2011, RB3011 and RB962, I’d like to upgrade them in the firmware version 6.48.5.
I’ve made an Ansible script:
Step 1:
upload on the router every file needed to update the router
Step 2:
/system routerboard upgrade
/system reboot
Step 3:
Then, I’d like to upload an extra package (tr069), so the ansible script upload the file, then do:
/system routerboard upgrade
/system reboot
Step 4:
configure TR069

But for some router just before the step 3, the system routerboard is:
factory-firmware: 3.33\n current-firmware: 6.46.1\n upgrade-firmware: 6.48.5

I don’t understand why the the current-firmware at this step is 6.46.1 and not 6.48.5.
Should I do an extra command to put the current-firmware in 6.48.5 for every device?

When i upload a extra package in the version 6.48.5 on a 6.46.1 device for example, the router fail is update and etherboot endlessly.

I’ve added to my script a check just before step 3 to make sure the current-version is 6.48.5. If it’s not it doesn’t upload the extra package.

Thanks, for your help,

I’ve even tried to do a simple restard on the mikrotik device when the the system routerboard is:
factory-firmware: 3.33\n current-firmware: 6.46.1\n upgrade-firmware: 6.48.5

After the second reboot, the mikrotik etherboot endlessly (which means there is a firmware problem?)

/system routerboard upgrade updates the boot firmware from the currently running RouterOS, not any uploaded-but-as-yet-not-installed version. The typical sequence would be:
Upload new RouterOS
Reboot to install and run new RouterOS
Upgrade RouterBOOT firmware
Reboot to use new RouterBOOT firmware

Normally if an additional package version does not match it is not installed and discarded. The reboot loop may be a bug introduced in 6.48.5 & 6.49, see http://forum.mikrotik.com/t/v6-48-5-long-term-is-released/152469/1 and fixed in 6.48.6 & 6.49.1 although if the current firmware is 6.46.1 it shouldn’t be the cause.